shaders: fix blank windows when using corner rounding (#8969) (#8971)

This commit is contained in:
Pollux 2025-01-06 13:30:57 -06:00 committed by GitHub
parent 1bf4937b02
commit b9f110ef87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
const float SMOOTHING_CONSTANT = )#" + const float SMOOTHING_CONSTANT = )#" +
std::format("{:.7f}", SHADER_ROUNDED_SMOOTHING_FACTOR) + R"#(; std::format("{:.7f}", SHADER_ROUNDED_SMOOTHING_FACTOR) + R"#(;
//if (pixCoord.x + pixCoord.y > radius) { if (pixCoord.x + pixCoord.y > radius) {
float dist = pow(pow(pixCoord.x, roundingPower) + pow(pixCoord.y, roundingPower), 1.0/roundingPower); float dist = pow(pow(pixCoord.x, roundingPower) + pow(pixCoord.y, roundingPower), 1.0/roundingPower);
@ -30,7 +30,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
)#" + )#" +
colorVarName + R"#( = )#" + colorVarName + R"#( * normalized; colorVarName + R"#( = )#" + colorVarName + R"#( * normalized;
//} }
)#"; )#";
}; };