http://msdn.microsoft.com/en-us/library/windows/desktop/ff476462(v=vs.85).aspx
blendstate
blendfactor
samplemask
SetBlendState()
有这三个参数 第二个的意思是 如果用这俩作为blendstate的参数 D3D11_BLEND_BLEND_FACTOR or D3D11_BLEND_INV_BLEND_FACTOR
就是blendfactor*srccolr.....
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476122(v=vs.85).aspx
从这点进去
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476463(v=vs.85).aspx
SetDepthStencilState()
第二个参数是stencil ref
cgfx->fx
colormask 对应 blendstate RenderTargetWriteMask
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476100(v=vs.85).aspx
typedef enum D3D11_COLOR_WRITE_ENABLE { D3D11_COLOR_WRITE_ENABLE_RED = 1, D3D11_COLOR_WRITE_ENABLE_GREEN = 2, D3D11_COLOR_WRITE_ENABLE_BLUE = 4, D3D11_COLOR_WRITE_ENABLE_ALPHA = 8, D3D11_COLOR_WRITE_ENABLE_ALL = ( D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN | D3D11_COLOR_WRITE_ENABLE_BLUE | D3D11_COLOR_WRITE_ENABLE_ALPHA ) } D3D11_COLOR_WRITE_ENABLE;
0
http://http.developer.nvidia.com/Cg/StencilFunc.html
StencilFunc = int(func) StencilFunc = int3(func, ref, mask)
nvidia