diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-17 23:16:13 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-17 23:16:13 +0000 |
| commit | e5870d47c74150aa744ed55f9b7e58713d968209 (patch) | |
| tree | 227fda73f787873bc97b64be333d0e0f7d596ec7 /src/render/shaders | |
| parent | 91a565c7b0957968d686fccf8f3a5166b9c3fec9 (diff) | |
LS: add blur and ignorezero rules
Diffstat (limited to 'src/render/shaders')
| -rw-r--r-- | src/render/shaders/Textures.hpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index 0bf168a4..4360f5db 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]; } )#" + |
