1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-01-09 02:43:25 +08:00
Godot-Shader-Lib/addons/ShaderLib/UV/RadialShearUV.gdshaderinc
2023-10-12 01:05:32 +05:30

6 lines
259 B
Plaintext

vec2 radial_shear_uv(vec2 uv, vec2 center, float strength, vec2 offset){
vec2 _delta = uv - center;
float _delta2 = dot(_delta.xy, _delta.xy);
vec2 _delta_offset = vec2(_delta2 * strength);
return uv + vec2(_delta.y, -_delta.x) * _delta_offset + offset;
}