摘要:
龙书中介绍了平面阴影,并且用模板防止双倍混合。说白了就是防止阴影部分重复渲染引发阴影更黑。但使用了下段代码后,阴影完全不见了。Device->SetRenderState(D3DRS_STENCILENABLE, true); Device->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_EQUAL); Device->SetRenderState(D3DRS_STENCILREF, 0x0); Device->SetRenderState(D3DRS_STENCILMASK, 0xffffffff); Device->SetR 阅读全文