diff --git a/src/Dodge/Render.hs b/src/Dodge/Render.hs index 0c0c900d6..113fae493 100644 --- a/src/Dodge/Render.hs +++ b/src/Dodge/Render.hs @@ -131,7 +131,8 @@ doDrawing pdata w = do --textureBinding Texture2D $= Just (snd3 $ _fbo2 pdata) textureBinding Texture2D $= Just (snd $ _fboLighting pdata) blend $= Enabled - blendFunc $= (Zero, OneMinusSrcAlpha) + --blendFunc $= (Zero, OneMinusSrcAlpha) + blendFunc $= (Zero, OneMinusSrcColor) drawShader (_fullscreenShader pdata) 4 blendFunc $= (SrcAlpha, OneMinusSrcAlpha) diff --git a/src/Render.hs b/src/Render.hs index 01c80be2f..948bf3c6e 100644 --- a/src/Render.hs +++ b/src/Render.hs @@ -34,7 +34,7 @@ createLightMap pdata lightPoints nWalls nSils nsurfVs = do depthFunc $= Just Less -- clear buffer to full alpha and furthest depth -- clearColor is specified in preloadRender - clearColor $= Color4 0 0 0 1 + clearColor $= Color4 1 1 1 1 clear [ColorBuffer,DepthBuffer] --colorMask $= Color4 Disabled Disabled Disabled Disabled cullFace $= Just Back @@ -82,7 +82,8 @@ createLightMap pdata lightPoints nWalls nSils nsurfVs = do -- draw geometry surfaces cullFace $= Just Back - colorMask $= Color4 Disabled Disabled Disabled Enabled + --colorMask $= Color4 Disabled Disabled Disabled Enabled + colorMask $= Color4 Enabled Enabled Enabled Enabled stencilFunc $= (Equal, 0, 255) currentProgram $= Just (_shaderProgram $ _lightingSurfaceShader pdata) uniform (head $ _shaderCustomUnis $ _lightingSurfaceShader pdata)