summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/commonShadowPoint.glsl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-28 02:25:11 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-28 02:25:11 +0000
commit892513f81ed68e05d4dedb99f51de5bc46cab6b2 (patch)
tree19209bc3f1c58123bd497c7c555ac8c7d251c351 /gfx/gl/shaders/commonShadowPoint.glsl
parentSet light view point uniform once (diff)
downloadilt-892513f81ed68e05d4dedb99f51de5bc46cab6b2.tar.bz2
ilt-892513f81ed68e05d4dedb99f51de5bc46cab6b2.tar.xz
ilt-892513f81ed68e05d4dedb99f51de5bc46cab6b2.zip
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.
Diffstat (limited to 'gfx/gl/shaders/commonShadowPoint.glsl')
-rw-r--r--gfx/gl/shaders/commonShadowPoint.glsl5
1 files changed, 3 insertions, 2 deletions
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);
}