Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Visual Shader UV Manipulation Node

An asset by Foyezes
The page banner background of a mountain and forest
Visual Shader UV Manipulation Node hero image

Quick Information

0 ratings
Visual Shader UV Manipulation Node icon image
Foyezes
Visual Shader UV Manipulation Node

This is a visual shader addon that adds the UVManipulation node to the visual shader editor.

Supported Engine Version
4.0
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
1 month ago
Git URL
Issue URL

Godot UV Manipulation Node

This is a visual shader addon for Godot 4.2+. This adds the UVManipulation node to the visual shader editor. README image

Method

This node allows you to change pivot point, scale, rotate and offset a UV.

The order of operation is: Change Pivot > Scale > Rotate > Reset Pivot > Offset

The rotate function is created first.

vec2 rotateUV(vec2 uv_in, float angle) {
      float angle_rad = radians(angle);
      mat2 rotate = mat2(
          vec2(cos(angle_rad), -sin(angle_rad)),
          vec2(sin(angle_rad), cos(angle_rad))
      );
  	return rotate * uv_in;
}

Then the UV manipulation.

vec2 UVManip(vec2 uv, float scale_placeholder, float rotation_placeholder, vec2 pivot_placeholder, vec2 offset_placeholder) {
  vec2 pivot_internal = clamp(pivot_placeholder, 0.0, 1.0);
  uv -= pivot_internal;
  uv *= scale_placeholder;
  uv = rotateUV(uv, rotation_placeholder);
  uv += pivot_internal;
  uv += offset_placeholder;
  return uv;
}

Installation

Extract the zip file and copy the folder to your project. You'll need to restart the editor for the node to appear in visual shader. Alternatively, you can make a new gdscript file and copy the code.

This is a visual shader addon that adds the UVManipulation node to the visual shader editor.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Visual Shader UV Manipulation Node icon image
Foyezes
Visual Shader UV Manipulation Node

This is a visual shader addon that adds the UVManipulation node to the visual shader editor.

Supported Engine Version
4.0
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
1 month ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers