diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:18:53 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:18:53 +0200 |
| commit | 833d73df09ee8925b7b4f5592611ad320b25e363 (patch) | |
| tree | 4c4a279ae84aae55e7a272221036282b0fb0d70f /src/render | |
| parent | 23eda1411b2dc990a159b64ad73ac182d12fb4f9 (diff) | |
shaders: short-circuit rounding if radius <= 0
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/shaders/Textures.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index e571d662..0928487f 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -120,8 +120,10 @@ void main() { pixColor[2] = pixColor[2] * tint[2]; } + if (radius > 0.0) { )#" + ROUNDED_SHADER_FUNC("pixColor") + R"#( + } gl_FragColor = pixColor * alpha; })#"; @@ -167,8 +169,10 @@ void main() { pixColor[2] = pixColor[2] * tint[2]; } + if (radius > 0.0) { )#" + ROUNDED_SHADER_FUNC("pixColor") + R"#( + } gl_FragColor = pixColor * alpha; })#"; @@ -255,8 +259,10 @@ void main() { pixColor[2] = pixColor[2] * tint[2]; } + if (radius > 0.0) { )#" + ROUNDED_SHADER_FUNC("pixColor") + R"#( + } gl_FragColor = pixColor * alpha; } |
