diff --git a/shader/shadow/cap.geom b/shader/shadow/cap.geom index 971c706a8..6614bb1d5 100644 --- a/shader/shadow/cap.geom +++ b/shader/shadow/cap.geom @@ -16,9 +16,9 @@ vec4 projNear (vec4 pos) // note we project to a specific height // this is quite brittle, not ideal vec3 dir = pos.xyz - lightPos ; - float a = (140 - pos.z) / dir.z ; + float a = (100 - pos.z) / dir.z ; vec2 xy = (pos.xyz + a * dir).xy ; - return vec4 ( xy, 140 , 1) ; + return vec4 ( xy, 100 , 1) ; } void main() { diff --git a/shader/shadow/edge.geom b/shader/shadow/edge.geom index df22326e8..6bc64ff6e 100644 --- a/shader/shadow/edge.geom +++ b/shader/shadow/edge.geom @@ -22,13 +22,13 @@ vec4 projNear(vec4 pos) { // note we project to a specific height // this is quite brittle, not ideal vec3 dir = pos.xyz - lightPos; - float a = (140 - pos.z) / dir.z; + float a = (100 - pos.z) / dir.z; vec2 xy = (pos.xyz + a * dir).xy; - return vec4(xy, 140, 1); + return vec4(xy, 100, 1); }; vec4 shiftNear(vec4 pos) { vec4 sp = shift(pos); - if (sp.z > 140) { + if (sp.z > 100) { return projNear(pos); } else { return sp; diff --git a/src/Render.hs b/src/Render.hs index a113b5566..9bd21be35 100644 --- a/src/Render.hs +++ b/src/Render.hs @@ -261,7 +261,7 @@ instanceLightMap cfig pdata lightPoints nWalls nSils nCaps toPos = do GL_UNSIGNED_SHORT nullPtr --draw caps on the near plane as required - --glEnable GL_CULL_FACE + glEnable GL_CULL_FACE glCullFace GL_BACK --glCullFace GL_FRONT glUseProgram (_shadName lcapShad)