Add shading for shapes and the floor

This commit is contained in:
2023-03-15 18:24:09 +00:00
parent 21f87b96d8
commit 989140d46e
16 changed files with 158 additions and 69 deletions
+3 -1
View File
@@ -100,7 +100,8 @@ createLightMap cfig pdata lightPoints nWalls nSils nCaps shadsdrawtype toPos dra
glClear $ GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT
-- glClearDepth 1
glDisable GL_CULL_FACE
bindTO toPos
--bindTO toPos
glBindTextureUnit 0 (toPos ^. unTO)
glDepthFunc GL_ALWAYS
glDepthMask GL_FALSE
_ -> do
@@ -173,6 +174,7 @@ createLightMap cfig pdata lightPoints nWalls nSils nCaps shadsdrawtype toPos dra
-- bind world position texture
glDisable GL_CULL_FACE
bindTO toPos
glBindTextureUnit 1 (pdata ^. fboBase . _2 . _3 . unTO)
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE
glStencilFunc GL_EQUAL 0 255
glUseProgram (ltextShad ^. shadName) --Just (_shadProg ltextShad)