diff options
Diffstat (limited to 'src/render/shaders/Textures.hpp')
-rw-r--r-- | src/render/shaders/Textures.hpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index 0bf168a4..52e77fae 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -96,6 +96,7 @@ uniform vec2 fullSize; uniform float radius; uniform int discardOpaque; +uniform int discardAlphaZero; uniform int applyTint; uniform vec3 tint; @@ -107,13 +108,15 @@ void main() { vec4 pixColor = texture2D(tex, v_texcoord); if (discardOpaque == 1 && pixColor[3] * alpha == 1.0) - discard; - + discard; + + if (discardAlphaZero == 1 && pixColor[3] == 0.0) + discard; if (applyTint == 1) { - pixColor[0] = pixColor[0] * tint[0]; - pixColor[1] = pixColor[1] * tint[1]; - pixColor[2] = pixColor[2] * tint[2]; + pixColor[0] = pixColor[0] * tint[0]; + pixColor[1] = pixColor[1] * tint[1]; + pixColor[2] = pixColor[2] * tint[2]; } )#" + @@ -142,6 +145,7 @@ uniform vec2 fullSize; uniform float radius; uniform int discardOpaque; +uniform int discardAlphaZero; uniform int applyTint; uniform vec3 tint; @@ -228,6 +232,7 @@ uniform vec2 fullSize; uniform float radius; uniform int discardOpaque; +uniform int discardAlphaZero; uniform int applyTint; uniform vec3 tint; |