Work on windows
This commit is contained in:
+3
-1
@@ -157,7 +157,6 @@ renderShadows isclouds cam cfig shadrendertype nWalls nSils nCaps positiontextur
|
||||
-- for each of the lights:
|
||||
-- 1. stencil out the shadows from this light's point of view
|
||||
-- 2. calculate lighting based on each fragment's position and normal
|
||||
-- TODO stencil out square around light!
|
||||
glEnable GL_SCISSOR_TEST
|
||||
glDisable GL_CULL_FACE
|
||||
flip VFSM.mapM_ (VFSM.fromList lightPoints) $ \(V3 x y z, rad, V3 r g b) -> do
|
||||
@@ -178,6 +177,7 @@ renderShadows isclouds cam cfig shadrendertype nWalls nSils nCaps positiontextur
|
||||
glStencilFunc GL_NOTEQUAL 128 255
|
||||
glBindVertexArray $ pdata ^. dummyVAO
|
||||
--draw wall shadows
|
||||
--these could possibly stencil out object shadows as well
|
||||
glUseProgram shadwall
|
||||
glDrawArrays GL_TRIANGLES 0 (nWalls * 18)
|
||||
case shadrendertype of
|
||||
@@ -197,6 +197,8 @@ renderShadows isclouds cam cfig shadrendertype nWalls nSils nCaps positiontextur
|
||||
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_FALSE
|
||||
glStencilFunc GL_EQUAL 0 255
|
||||
glUseProgram ltextShad
|
||||
-- we could draw a specific quad based on the size of the light rather
|
||||
-- than a full screen quad here
|
||||
glDrawArrays GL_TRIANGLES 0 6
|
||||
--cleanup: may not be necessary, depending on what comes after...
|
||||
glDisable GL_SCISSOR_TEST
|
||||
|
||||
Reference in New Issue
Block a user