diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index 50a68e02..a541ec0a 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -22,15 +22,15 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar if (primitiveMultisample == 1 && dist > radius - 1.0) { float distances = 0.0; - if (length(pixCoord + vec2(0.25, 0.25)) < radius) { distances = distances + 1.0; } - if (length(pixCoord + vec2(0.75, 0.25)) < radius) { distances = distances + 1.0; } - if (length(pixCoord + vec2(0.25, 0.75)) < radius) { distances = distances + 1.0; } - if (length(pixCoord + vec2(0.75, 0.75)) < radius) { distances = distances + 1.0; } + distances += float(length(pixCoord + vec2(0.25, 0.25)) < radius); + distances += float(length(pixCoord + vec2(0.75, 0.25)) < radius); + distances += float(length(pixCoord + vec2(0.25, 0.75)) < radius); + distances += float(length(pixCoord + vec2(0.75, 0.75)) < radius); if (distances == 0.0) discard; - distances = distances / 4.0; + distances /= 4.0; )#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances; }