summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-10 00:48:06 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-10 00:48:06 +0100
commitc9bf24c7d1c10e2ff7349fa2d9010895860977a9 (patch)
tree1409d6504ba7abd341beec9df01ef58aae792a43 /gfx/gl/shaders
parentUse LightDirection for calculating/passing all light dir components (diff)
downloadilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.tar.bz2
ilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.tar.xz
ilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.zip
Fix stencil shadow depth offset
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r--gfx/gl/shaders/shadowDynamicPointStencil.fs2
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/gl/shaders/shadowDynamicPointStencil.fs b/gfx/gl/shaders/shadowDynamicPointStencil.fs
index e612691..fe91b07 100644
--- a/gfx/gl/shaders/shadowDynamicPointStencil.fs
+++ b/gfx/gl/shaders/shadowDynamicPointStencil.fs
@@ -12,5 +12,5 @@ main()
if (stDepth >= 1) {
discard;
}
- gl_FragDepth = gl_FragCoord.z + (stDepth * scale.z);
+ gl_FragDepth = gl_FragCoord.z + ((stDepth - 0.5) * scale.z);
}