1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-01-05 00:53:36 +08:00

Update SwirlUV.gdshaderinc

This commit is contained in:
Digvijaysinh Gohil 2024-05-31 00:24:27 +05:30
parent ce44d78559
commit 45ddc1f6a2

View File

@ -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))