summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/shadowStencil.fs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders/shadowStencil.fs')
-rw-r--r--gfx/gl/shaders/shadowStencil.fs16
1 files changed, 16 insertions, 0 deletions
diff --git a/gfx/gl/shaders/shadowStencil.fs b/gfx/gl/shaders/shadowStencil.fs
index e69de29..f149c23 100644
--- a/gfx/gl/shaders/shadowStencil.fs
+++ b/gfx/gl/shaders/shadowStencil.fs
@@ -0,0 +1,16 @@
+#version 330 core
+#extension GL_ARB_shading_language_420pack : enable
+
+layout(binding = 0) uniform sampler2D textureAlbedo;
+
+include(`materialInterface.glsl')
+include(`materialCommon.glsl')
+
+void
+main()
+{
+ if (getTextureColour(Material, TexCoords).a < 0.5) {
+ discard;
+ }
+ gl_FragDepth = gl_FragCoord.z;
+}