summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r--gfx/gl/shaders/shadowDynamicPointStencil.fs4
-rw-r--r--gfx/gl/shaders/shadowDynamicPointStencil.gs4
2 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/shaders/shadowDynamicPointStencil.fs b/gfx/gl/shaders/shadowDynamicPointStencil.fs
index 57b8aa3..e612691 100644
--- a/gfx/gl/shaders/shadowDynamicPointStencil.fs
+++ b/gfx/gl/shaders/shadowDynamicPointStencil.fs
@@ -1,9 +1,9 @@
#version 330 core
#extension GL_ARB_shading_language_420pack : enable
-layout(binding = 0) uniform sampler2D stencilDepth;
+layout(binding = 0) uniform sampler2DArray stencilDepth;
flat in vec3 scale;
-in vec2 texCoord;
+in vec3 texCoord;
void
main()
diff --git a/gfx/gl/shaders/shadowDynamicPointStencil.gs b/gfx/gl/shaders/shadowDynamicPointStencil.gs
index 2873691..b91937d 100644
--- a/gfx/gl/shaders/shadowDynamicPointStencil.gs
+++ b/gfx/gl/shaders/shadowDynamicPointStencil.gs
@@ -11,7 +11,7 @@ uniform float size;
in ivec3 vworldPos[];
flat out vec3 scale;
-out vec2 texCoord;
+out vec3 texCoord;
layout(points) in;
layout(triangle_strip, max_vertices = 16) out;
@@ -25,7 +25,7 @@ main()
for (int c = 0; c < corners.length(); ++c) {
gl_Position = pos + vec4(scale.xy * corners[c], 0, 0);
gl_Position.z = max(gl_Position.z, -1);
- texCoord = (corners[c] * 0.5) + 0.5;
+ texCoord = vec3((corners[c] * 0.5) + 0.5, 0);
EmitVertex();
}
EndPrimitive();