Commit before implementing downscaled resolution
This commit is contained in:
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user