aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-07-20 18:18:53 +0200
committervaxerski <[email protected]>2023-07-20 18:18:53 +0200
commit833d73df09ee8925b7b4f5592611ad320b25e363 (patch)
tree4c4a279ae84aae55e7a272221036282b0fb0d70f
parent23eda1411b2dc990a159b64ad73ac182d12fb4f9 (diff)
downloadHyprland-833d73df09ee8925b7b4f5592611ad320b25e363.tar.gz
Hyprland-833d73df09ee8925b7b4f5592611ad320b25e363.zip
shaders: short-circuit rounding if radius <= 0
-rw-r--r--src/render/shaders/Textures.hpp6
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;
}