summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/commonShadowPoint.glsl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 20:10:24 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 20:10:24 +0100
commit425add81fc8718f1ac4fde48a71344cd332d5a58 (patch)
tree7f4bcbd89342b07d2faee1eb00f3f9b804ed5ac2 /gfx/gl/shaders/commonShadowPoint.glsl
parentMerge branch 'imgui' (diff)
downloadilt-425add81fc8718f1ac4fde48a71344cd332d5a58.tar.bz2
ilt-425add81fc8718f1ac4fde48a71344cd332d5a58.tar.xz
ilt-425add81fc8718f1ac4fde48a71344cd332d5a58.zip
Add shadow shader which takes into account texture transparency
Diffstat (limited to 'gfx/gl/shaders/commonShadowPoint.glsl')
-rw-r--r--gfx/gl/shaders/commonShadowPoint.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/gl/shaders/commonShadowPoint.glsl b/gfx/gl/shaders/commonShadowPoint.glsl
index ba4611a..c4ea827 100644
--- a/gfx/gl/shaders/commonShadowPoint.glsl
+++ b/gfx/gl/shaders/commonShadowPoint.glsl
@@ -1,8 +1,11 @@
out vec4 vworldPos;
+ifdef(`TEXTURES', out vec2 vtexCoord;);
+
void
main()
{
vec3 worldPos = model * position;
vworldPos = vec4(worldPos - viewPoint + modelPos, 1);
+ ifdef(`TEXTURES', vtexCoord = texCoord;);
}