Fix remote camera bug

This commit is contained in:
2021-08-27 12:45:52 +01:00
parent 3ff04576ab
commit 832232fef6
7 changed files with 70 additions and 21 deletions
+4 -3
View File
@@ -38,11 +38,12 @@ createLightMap pdata lightPoints nWalls nSils nsurfVs = do
clear [ColorBuffer,DepthBuffer]
--colorMask $= Color4 Disabled Disabled Disabled Disabled
cullFace $= Just Back
-- draw wall surfaces from your point of view in order to set z buffer
-- we assume that the camera position uniforms have been correctly set elsewhere
-- draw wall surfaces from the camera's point of view in order to set z buffer
drawShader (_lightingWallShader pdata) nWalls
-- draw foreground elements from your point of view to set z buffer
-- draw foreground elements the camera's your point of view to set z buffer
drawShader (_lightingSurfaceShader pdata) nsurfVs
-- draw wall occlusions from your point of view
-- draw wall occlusions from the camera's 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