Use stencil test to not draw floors where there are chasms
This commit is contained in:
@@ -153,6 +153,7 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
|
||||
-- 1. stencil out the shadows from this light's point of view
|
||||
-- 2. calculate lighting based on each fragment's position and normal
|
||||
flip VFSM.mapM_ (VFSM.fromList lightPoints) $ \(V3 x y z, rad, V3 r g b) -> do
|
||||
-- note that the stencil shadows rely on the depth buffer
|
||||
glDepthFunc GL_LESS
|
||||
-- setup stencil
|
||||
glColorMask GL_FALSE GL_FALSE GL_FALSE GL_FALSE
|
||||
|
||||
Reference in New Issue
Block a user