From 425add81fc8718f1ac4fde48a71344cd332d5a58 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jul 2024 20:10:24 +0100 Subject: Add shadow shader which takes into account texture transparency --- gfx/gl/shaders/commonShadowPoint.gs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gfx/gl/shaders/commonShadowPoint.gs') 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(); -- cgit v1.2.3