]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix stencil shadows in D3D9
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Sep 2010 01:38:43 +0000 (01:38 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Sep 2010 01:38:43 +0000 (01:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10457 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index 2a71b1f29b46a8c9b7bf863a489221db7aa4e3ad..a17730cf1bd2ffa874cd561a3db0a8f57c4a3050 100644 (file)
@@ -1579,11 +1579,11 @@ void R_SetStencilSeparate(qboolean enable, int writemask, int frontfail, int fro
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFAIL, d3dstencilopforglfunc(frontfail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILZFAIL, d3dstencilopforglfunc(frontzfail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILPASS, d3dstencilopforglfunc(frontzpass));
-               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFUNC, frontcompare);
+               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFUNC, d3dcmpforglfunc(frontcompare));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_CCW_STENCILFAIL, d3dstencilopforglfunc(backfail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_CCW_STENCILZFAIL, d3dstencilopforglfunc(backzfail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_CCW_STENCILPASS, d3dstencilopforglfunc(backzpass));
-               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_CCW_STENCILFUNC, backcompare);
+               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_CCW_STENCILFUNC, d3dcmpforglfunc(backcompare));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILREF, comparereference);
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILMASK, comparemask);
 #endif
@@ -1632,7 +1632,7 @@ void R_SetStencil(qboolean enable, int writemask, int fail, int zfail, int zpass
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFAIL, d3dstencilopforglfunc(fail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILZFAIL, d3dstencilopforglfunc(zfail));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILPASS, d3dstencilopforglfunc(zpass));
-               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFUNC, compare);
+               IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILFUNC, d3dcmpforglfunc(compare));
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILREF, comparereference);
                IDirect3DDevice9_SetRenderState(vid_d3d9dev, D3DRS_STENCILMASK, comparemask);
 #endif