diff --git a/src/Loop.hs b/src/Loop.hs index 5f7d9e604..752e173af 100644 --- a/src/Loop.hs +++ b/src/Loop.hs @@ -55,7 +55,7 @@ setupLoop wName xSize ySize (\_ -> bracket customInit initCleanup $ \setup -> do -- setup <- customInit -- swapInterval $= ImmediateUpdates GL.blend $= GL.Enabled - GL.depthMask $= GL.Enabled +-- GL.depthMask $= GL.Enabled GL.blendEquation $= GL.FuncAdd GL.blendFunc $= (GL.SrcAlpha,GL.OneMinusSrcAlpha) GL.clearColor $= GL.Color4 0 0.5 0 1 diff --git a/src/Picture/Preload.hs b/src/Picture/Preload.hs index 9def267bf..2c57f92b1 100644 --- a/src/Picture/Preload.hs +++ b/src/Picture/Preload.hs @@ -113,6 +113,7 @@ setupFramebuffer = do bindRenderbuffer Renderbuffer $= fboRBO renderbufferStorage Renderbuffer Depth24Stencil8 (RenderbufferSize 800 600) -- not sure if the stencil is needed + framebufferRenderbuffer Framebuffer DepthStencilAttachment Renderbuffer fboRBO fboStatus <- framebufferStatus Framebuffer putStrLn $ show fboStatus diff --git a/src/Picture/Render.hs b/src/Picture/Render.hs index dc262cda7..6b78f4e3c 100644 --- a/src/Picture/Render.hs +++ b/src/Picture/Render.hs @@ -51,9 +51,11 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints p -- draw lightmap bindFramebuffer Framebuffer $= (_spareFBO pdata) + depthFunc $= Just Less clearColor $= Color4 0 0.5 0 1 clearDepth $= (200) clear [ColorBuffer] +-- depthMask $= Enabled nWalls <- F.foldM (pokeShader (_wallShadowShader pdata)) wallPoints bindShaderBuffers [_wallShadowShader pdata] [nWalls]