rj-action-library/Runtime/Shading/Library/UV.gdshaderinc

9 lines
237 B
Plaintext
Raw Normal View History

2025-09-21 07:35:17 +00:00
// #include "res://addons/rokojori_action_library/Runtime/Shading/Library/UV.gdshaderinc"
vec2 mapUV( vec2 position, vec2 size, vec2 center )
{
vec2 offset = center - size/2.0;
2025-09-26 12:00:59 +00:00
vec2 uv = ( position - offset ) / size;
2025-09-21 07:35:17 +00:00
return uv;
}