mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
shaders: Remove redundant clamp of smoothsteps return value. (#3456)
This commit is contained in:
@@ -71,11 +71,11 @@ void main() {
|
||||
|
||||
if (dist < radius - h) {
|
||||
// lower
|
||||
float normalized = clamp(smoothstep(0.0, 1.0, dist - radius + thick + 0.5), 0.0, 1.0);
|
||||
float normalized = smoothstep(0.0, 1.0, dist - radius + thick + 0.5);
|
||||
additionalAlpha *= normalized;
|
||||
} else {
|
||||
// higher
|
||||
float normalized = 1.0 - clamp(smoothstep(0.0, 1.0, dist - radius + 0.5), 0.0, 1.0);
|
||||
float normalized = 1.0 - smoothstep(0.0, 1.0, dist - radius + 0.5);
|
||||
additionalAlpha *= normalized;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
|
||||
if (dist > radius - 1.0) {
|
||||
float dist = length(pixCoord);
|
||||
|
||||
float normalized = 1.0 - clamp(smoothstep(0.0, 1.0, dist - radius + 0.5), 0.0, 1.0);
|
||||
float normalized = 1.0 - smoothstep(0.0, 1.0, dist - radius + 0.5);
|
||||
|
||||
)#" +
|
||||
colorVarName + R"#( = )#" + colorVarName + R"#( * normalized;
|
||||
|
Reference in New Issue
Block a user