Add hard edge to non-visible areas
This commit is contained in:
+9
-1
@@ -11,7 +11,7 @@ import Dodge.Base
|
||||
--import Dodge.Render.MenuScreen
|
||||
import Dodge.Render.Picture
|
||||
--import Dodge.Render.PerspectiveMatrix
|
||||
import Geometry
|
||||
--import Geometry
|
||||
import Geometry.Data
|
||||
--import Picture
|
||||
import Render
|
||||
@@ -67,6 +67,14 @@ doDrawing pdata w = do
|
||||
createLightMap pdata (w ^. config . shadow_resolution) wallPoints lightPoints viewFroms
|
||||
(foregroundPics w) scPol
|
||||
clear [DepthBuffer]
|
||||
|
||||
nWalls <- F.foldM (pokeShader $ _lightingOccludeShader pdata) (map Render22 wallPoints)
|
||||
bindShaderBuffers [_lightingOccludeShader pdata] [nWalls]
|
||||
currentProgram $= Just (_shaderProgram $ _lightingOccludeShader pdata)
|
||||
uniform (head $ _shaderCustomUnis $ _lightingOccludeShader pdata)
|
||||
$= Vector2 viewFromx viewFromy
|
||||
drawShader (_lightingOccludeShader pdata) nWalls
|
||||
|
||||
depthFunc $= Just Less
|
||||
-- set blending to depend upon the alpha level already present
|
||||
blendFuncSeparate $= ((SrcAlphaSaturate, OneMinusSrcAlpha), (Zero,One))
|
||||
|
||||
Reference in New Issue
Block a user