Commit before implementing downscaled resolution

This commit is contained in:
2021-08-19 19:50:44 +02:00
parent bc236671f2
commit 8e3bf3b19f
7 changed files with 15 additions and 124 deletions
+7 -3
View File
@@ -38,12 +38,16 @@ createLightMap pdata lightPoints nWalls nSils nsurfVs = do
clear [ColorBuffer,DepthBuffer]
--colorMask $= Color4 Disabled Disabled Disabled Disabled
cullFace $= Just Back
-- draw walls from your point of view in order to set z buffer
-- draw wall surfaces from your point of view in order to set z buffer
drawShader (_lightingWallShader pdata) nWalls
-- draw foreground elements to set z buffer
-- draw foreground elements from your point of view to set z buffer
drawShader (_lightingSurfaceShader pdata) nsurfVs
-- draw wall occlusions from your point of view
drawShader (_lightingOccludeShader pdata) nWalls
--hypothesis: the above three draw calls only work because the
--uniform was set to your position, that being the last light source in the list
--if this hypothesis is correct, then the code is brittle and should be changed
-- for each of the lights:
-- stencil out the walls from this light's point of view
-- draw fading lightmap circles on the floor