From 772c7d1d3cc7b3dd38450edf0ac1152419ef9eb1 Mon Sep 17 00:00:00 2001 From: Dickby Date: Sat, 30 Sep 2023 14:12:48 +0200 Subject: shaders: Remove redundant clamp of smoothsteps return value. (#3456) --- src/render/shaders/Textures.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/render/shaders/Textures.hpp') diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index dac511c7..109840ca 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -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; @@ -100,7 +100,7 @@ void main() { if (discardOpaque == 1 && pixColor[3] * alpha == 1.0) discard; - + if (discardAlpha == 1 && pixColor[3] <= discardAlphaValue) discard; @@ -349,4 +349,4 @@ void main() { gl_FragColor = pixColor; } -)#"; \ No newline at end of file +)#"; -- cgit v1.2.3