diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-31 02:51:16 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-31 02:51:16 +0000 |
| commit | bc0958cc863083b4082161bf12456fdf28ab1c77 (patch) | |
| tree | f970782f232d86325f14a36b83125791f24335af /gfx/gl/shaders/shadowDynamicPointStencil.frag | |
| parent | Initial commit using tesselation shader to create curves (diff) | |
| download | ilt-bc0958cc863083b4082161bf12456fdf28ab1c77.tar.bz2 ilt-bc0958cc863083b4082161bf12456fdf28ab1c77.tar.xz ilt-bc0958cc863083b4082161bf12456fdf28ab1c77.zip | |
Rename shader source in keeping with glsl expectations
Swaps name/type of generated files to match class names and source
files.
Diffstat (limited to 'gfx/gl/shaders/shadowDynamicPointStencil.frag')
| -rw-r--r-- | gfx/gl/shaders/shadowDynamicPointStencil.frag | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gfx/gl/shaders/shadowDynamicPointStencil.frag b/gfx/gl/shaders/shadowDynamicPointStencil.frag new file mode 100644 index 0000000..d6b8a0e --- /dev/null +++ b/gfx/gl/shaders/shadowDynamicPointStencil.frag @@ -0,0 +1,15 @@ +#version 460 core + +layout(binding = 0) uniform sampler2DArray stencilDepth; +flat in vec3 scale; +in vec3 texCoord; + +void +main() +{ + float stDepth = texture(stencilDepth, texCoord).r; + if (stDepth >= 1) { + discard; + } + gl_FragDepth = gl_FragCoord.z + ((stDepth - 0.5) * scale.z); +} |
