shaders: short-circuit rounding if radius <= 0

This commit is contained in:
vaxerski 2023-07-20 18:18:53 +02:00
parent 23eda1411b
commit 833d73df09

View file

@ -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;
}