Commit before fully removing uniforms other than the matrix
This commit is contained in:
+11
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user