Advertisement
Outside_of_Awareness

Godot Texture Rotation Code for Visual Shader Expression Node

Feb 18th, 2024 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uv_in -= pivot;
  2. float rotation_radians = radians(rotation_degrees);
  3. float c = cos(rotation_radians);
  4. float s = sin(rotation_radians);
  5.  
  6. uv_out.x = uv_in.x * c + uv_in.y * s;
  7. uv_out.y = uv_in.y * c - uv_in.x * s;
  8.  
  9. uv_out += pivot;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement