Cleanup: remove uniforms from shader datatype

This commit is contained in:
2023-03-20 01:19:10 +00:00
parent 33f31aa385
commit 32ecf46343
17 changed files with 24 additions and 99 deletions
+4 -2
View File
@@ -127,8 +127,10 @@ doDrawing' win pdata u = do
glDepthFunc GL_LESS
-- draw wall occlusions from the camera's point of view
glUseProgram (pdata ^. lightingWallShadShader . shadName)
glUniform3f (pdata ^?! lightingWallShadShader . shadUnis . ix 0) vfx vfy 20
glUniform1f (pdata ^?! lightingWallShadShader . shadUnis . ix 1) 1000
glProgramUniform3f (pdata ^. lightingWallShadShader . shadName)
0 vfx vfy 20
glProgramUniform1f (pdata ^. lightingWallShadShader . shadName)
1 1000
glBindVertexArray $ pdata ^. lightingWallShadShader . shadVAO . vaoName
unless (debugOn Remove_LOS cfig) $
glDrawArrays
+2 -1
View File
@@ -13,6 +13,7 @@ import Dodge.Wall.Draw
import Geometry
import ShapePicture
-- not necessary: should just poke all walls to their wanted places
wallsToDraw :: World -> ([((Point2, Point2), Point4)], [((Point2, Point2), Point4)], SPic, [Wall])
wallsToDraw w = L.fold
( (,,,)
@@ -22,9 +23,9 @@ wallsToDraw w = L.fold
<*> L.prefilter wlOpaqueDraw L.list
)
(w ^. cWorld . lWorld . walls)
-- (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam)
where
f wl = (_wlLine wl, _wlColor wl)
-- (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam)
-- cam = w ^. cWorld . camPos
--wallsToDraw