summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/commonShadowPoint.gs
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.gs
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.gs')
-rw-r--r--gfx/gl/shaders/commonShadowPoint.gs3
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/gl/shaders/commonShadowPoint.gs b/gfx/gl/shaders/commonShadowPoint.gs
index b008f29..b99bd20 100644
--- a/gfx/gl/shaders/commonShadowPoint.gs
+++ b/gfx/gl/shaders/commonShadowPoint.gs
@@ -7,6 +7,8 @@ in vec4 vworldPos[];
layout(triangles) in;
layout(triangle_strip, max_vertices = 12) out;
+ifdef(`TEXTURES', in vec2 vtexCoord[]; out vec2 texCoord;);
+
void
main()
{
@@ -15,6 +17,7 @@ main()
gl_Position = viewProjection[vp] * vworldPos[v];
gl_Position.z = max(gl_Position.z, -1);
gl_Layer = vp;
+ ifdef(`TEXTURES', texCoord = vtexCoord[v];);
EmitVertex();
}
EndPrimitive();