cg 到hlsl的轉換

minggoddess發表於2014-04-22

http://msdn.microsoft.com/en-us/library/windows/desktop/ff471376(v=vs.85).aspx

 

http://gamedev.stackexchange.com/questions/28647/cg-cgfx-to-glsl

 CullFaceEnable(Ture False) &&CullFace (Back Front) D3D9的這兩個引數

對應 CullMode 這個一個D3D11 (NONE FRONT BACK)

Rasterizer state

 

d3d9            d3d11

DepthMask (ture false)   DepthWriteMask(_zero/off _all/on)

 

 

 

StencilOp = int3(sfail, dpfail, dppass)

set reference

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476463(v=vs.85).aspx

 

void OMSetDepthStencilState(
  [in]  ID3D11DepthStencilState *pDepthStencilState,
  [in]  UINT StencilRef
);


http://msdn.microsoft.com/en-us/library/windows/desktop/ff476122(v=vs.85).aspx

ColorMask(r,g,b,a)
http://http.developer.nvidia.com/Cg/ColorMask.html
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476462(v=vs.85).aspx

setblendstate(blendstate,blendfactor,samplemask)

http://http.developer.nvidia.com/Cg/StencilOp.html

相關文章