cg 到hlsl的转换

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

你可能感兴趣的:(转换)