From 45ddc1f6a2716ee5f5c13e52688469242bf71773 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Fri, 31 May 2024 00:24:27 +0530 Subject: [PATCH] Update SwirlUV.gdshaderinc --- addons/ShaderLib/UV/SwirlUV.gdshaderinc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/ShaderLib/UV/SwirlUV.gdshaderinc b/addons/ShaderLib/UV/SwirlUV.gdshaderinc index e776d71..e427a7d 100644 --- a/addons/ShaderLib/UV/SwirlUV.gdshaderinc +++ b/addons/ShaderLib/UV/SwirlUV.gdshaderinc @@ -1,6 +1,6 @@ vec2 swirl_uv(vec2 uv, vec2 center, float strength, vec2 offset){ vec2 _delta = uv - center; - float _angle = strength * pow(1. - length(_delta), 3); + float _angle = strength * max(pow(1. - length(_delta), 3), 0); mat2 _rotation = mat2( vec2(cos(_angle), -sin(_angle)), vec2(sin(_angle), cos(_angle))