mx_transform_uv
mx_transform_uv
Scales and offsets UVs. Equivalent to: uv_geo * uv_scale + uv_offset. Defaults to the geometry’s primary UV.
Core Advantages
Single, chainable UV transform node. Accepts float or vec2 for scale and offset, cutting boilerplate and keeping texture sampling readable.
Common Uses
Texture tiling and zoom
UV scrolling animation
Texture atlas frame/region offset
Mirroring or flipping via negative scale
How to adjust
uv_scale can be a float (uniform scale) or vec2 (non-uniform). uv_offset can be float or vec2 for translation. Negative scale mirrors the UVs. Values outside [0,1] require the texture wrap mode to be Repeat or MirroredRepeat for proper tiling. Replace uv_geo with a custom coordinate stream to compose more complex mappings.
Code Examples
1// Use transformed UVs to sample a texture and feed the standard material
2<meshStandardNodeMaterial
3 colorNode={
4 texture(
5 map,
6 mx_transform_uv( vec2( 3.0, 2.0 ), vec2( 0.1, 0.0 ) ) // scale + offset
7 )
8 }
9/>
10