DigvijaysinhGohil / Godot-Shader-Lib

Visual shader node library for Godot engine.
MIT License
138 stars 8 forks source link

twirl_uv has an offset input but does not use it #9

Closed GivenFlesh closed 3 months ago

GivenFlesh commented 3 months ago

The node for twirl takes in an offset but doesn't do anything with it:

vec2 twirl_uv(vec2 uv, vec2 center, float strength, vec2 offset){
    vec2 _delta = uv - center;
    float _angle = strength * length(_delta);
    mat2 _rotation = mat2(
        vec2(cos(_angle), -sin(_angle)),
        vec2(sin(_angle), cos(_angle))
    );
    _delta = _rotation * _delta;
    return _delta + center;
}
DigvijaysinhGohil commented 3 months ago

I have fixed it, will release the v2.2.4 soon with the fix. Till then you could download it from "godot-4.2" branch.