From 892513f81ed68e05d4dedb99f51de5bc46cab6b2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 28 Jan 2024 02:25:11 +0000 Subject: Geometry shader for single pass shadow maps 2D array texture, 4 levels, geometry shader outputs to each layer for a specific band, single scene rendering. Pending massive tidy up. --- gfx/gl/shaders/commonShadowPoint.glsl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gfx/gl/shaders/commonShadowPoint.glsl') diff --git a/gfx/gl/shaders/commonShadowPoint.glsl b/gfx/gl/shaders/commonShadowPoint.glsl index 47722d6..ba4611a 100644 --- a/gfx/gl/shaders/commonShadowPoint.glsl +++ b/gfx/gl/shaders/commonShadowPoint.glsl @@ -1,7 +1,8 @@ +out vec4 vworldPos; + void main() { vec3 worldPos = model * position; - gl_Position = viewProjection * vec4(worldPos - viewPoint + modelPos, 1); - gl_Position.z = max(gl_Position.z, -1); + vworldPos = vec4(worldPos - viewPoint + modelPos, 1); } -- cgit v1.2.3