summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/shadowDynamicPointStencil.fs
blob: e612691d05f0e1902ca53a595ee74741408e4e04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#version 330 core
#extension GL_ARB_shading_language_420pack : enable

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 * scale.z);
}