diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/shader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/shader.cpp b/src/client/shader.cpp index 0b35c37af..dc9e9ae6d 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -674,8 +674,12 @@ ShaderInfo ShaderSource::generateShader(const std::string &name, if (strstr(gl_renderer, "GC7000")) use_discard = true; #endif - if (use_discard && shaderinfo.base_material != video::EMT_SOLID) - shaders_header << "#define USE_DISCARD 1\n"; + if (use_discard) { + if (shaderinfo.base_material == video::EMT_TRANSPARENT_ALPHA_CHANNEL) + shaders_header << "#define USE_DISCARD 1\n"; + else if (shaderinfo.base_material == video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF) + shaders_header << "#define USE_DISCARD_REF 1\n"; + } #define PROVIDE(constant) shaders_header << "#define " #constant " " << (int)constant << "\n" |