Fix wall depth rendering
This commit is contained in:
@@ -53,14 +53,6 @@ renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol
|
||||
|
||||
renderWalls pdata wallPointsCol pmat
|
||||
|
||||
renderWalls pdata windowPoints pmat
|
||||
|
||||
-- hack: the walls are drawn with a continuous depth from 0 to -1
|
||||
-- the following call is aimed at setting the depth buffer over all the walls to
|
||||
-- at most -0.9
|
||||
colorMask $= (Color4 Disabled Disabled Disabled Disabled)
|
||||
renderFoldable pdata $ picToLTree (Just 3) pic
|
||||
colorMask $= (Color4 Enabled Enabled Enabled Enabled)
|
||||
|
||||
depthFunc $= Just Lequal
|
||||
|
||||
@@ -76,6 +68,8 @@ renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol
|
||||
|
||||
renderFoldable pdata $ picToLTree (Just 2) pic
|
||||
|
||||
renderWalls pdata windowPoints pmat
|
||||
|
||||
resetShaderUniforms (map extractProgAndUnis $ _listShaders pdata)
|
||||
endTicks <- SDL.ticks
|
||||
return (ticksAfterLighting, endTicks - startTicks)
|
||||
|
||||
Reference in New Issue
Block a user