Commit before fully removing uniforms other than the matrix

This commit is contained in:
2021-06-10 15:45:52 +02:00
parent aa30f6b969
commit 0a8370c7c6
9 changed files with 25 additions and 151 deletions
+11 -2
View File
@@ -64,9 +64,10 @@ createLightMap
-> [(Point2,Point2)] -- Wall pairs
-> [Point4] -- Lights
-> (Float,Float) -- View from position
-> GLmatrix GLfloat
-> GLmatrix GLfloat -- perspective matrix
-> Picture -- foreground pictures
-> IO ()
createLightMap pdata resDiv wallPoints lightPoints (viewFromx,viewFromy) pmat = do
createLightMap pdata resDiv wallPoints lightPoints (viewFromx,viewFromy) pmat _ = do
-- get viewport size so we can reset it later
(vppos,vpsize) <- get viewport
@@ -99,6 +100,14 @@ createLightMap pdata resDiv wallPoints lightPoints (viewFromx,viewFromy) pmat =
$= (0 :: Float)
cullFace $= Just Back
drawShader (_lightingOccludeShader pdata) nWalls
cullFace $= Nothing
---- draw foreground elements to set z buffer
-- forM_ (_pictureShaders pdata) $ \shad -> do
-- currentProgram $= Just (_shaderProgram shad)
-- uniform (_shaderUniforms shad !! 4) $= pmat
-- _ <- renderFoldable pdata $ picToLTree (Just 0) fpics
-- for each of the lights:
-- stencil out the walls from this light's point of view
-- draw fading lightmap circles on the floor