Skip to content

material.unlit#baseColorTextureTransform

Summary

material.unlit#baseColorTextureTransform adjusts the base-color texture coordinates independently of the mesh positions. Use it to repeat or offset a texture or to sample the geometry's second UV set.

Syntax

get baseColorTextureTransform(): TextureTransform
set baseColorTextureTransform(value: TextureTransformDescriptor | null)
material.baseColorTextureTransform = { scale: [2, 2] };

Parameters

Assign a TextureTransformDescriptor with optional offset, rotation in radians, scale and texCoord (0 or 1). Assignment replaces the settings and marks uniforms dirty. Assign null to restore zero offset, zero rotation, unit scale and UV set zero.

Returns

TextureTransform - A copy of the normalized transform. Changes to the returned arrays take effect only when the descriptor is assigned back.

See Also