summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-08-10 18:01:13 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-08-10 18:10:04 +0100
commit26c60d5ace9b2a0667a930c4c92a3990a1d7d1dc (patch)
tree7244d9e1902d2a2c90ad2e92e00ea53343c288cf /gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs
parentPull material detail function into a common file (diff)
downloadilt-26c60d5ace9b2a0667a930c4c92a3990a1d7d1dc.tar.bz2
ilt-26c60d5ace9b2a0667a930c4c92a3990a1d7d1dc.tar.xz
ilt-26c60d5ace9b2a0667a930c4c92a3990a1d7d1dc.zip
Fix texture usage via materials in shadows
This is a mess of a commit much like the shader folder, need a better way of dealing with them.
Diffstat (limited to 'gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs')
-rw-r--r--gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs8
1 files changed, 6 insertions, 2 deletions
diff --git a/gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs b/gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs
index 90519e3..47ce9c0 100644
--- a/gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs
+++ b/gfx/gl/shaders/shadowDynamicPointInstWithTextures.fs
@@ -1,14 +1,18 @@
#version 330 core
#extension GL_ARB_shading_language_420pack : enable
-layout(binding = 3) uniform sampler2D texture0;
+layout(binding = 3) uniform sampler2D textureAlbedo;
+
+include(`materialInterface.glsl')
+include(`materialCommon.glsl')
in vec2 texCoord;
+flat in MaterialDetail material;
void
main()
{
- if (texture(texture0, texCoord).a < 0.5) {
+ if (getTextureColour(material, texCoord).a < 0.5) {
discard;
}
gl_FragDepth = gl_FragCoord.z;