Material:getTransform

Returns the transformation applied to texture coordinates of the Material.

ox, oy, sx, sy, angle = Material:getTransform()

Arguments

None

Returns

NameTypeDescription
oxnumberThe texture coordinate x offset.
oynumberThe texture coordinate y offset.
sxnumberThe texture coordinate x scale.
synumberThe texture coordinate y scale.
anglenumberThe texture coordinate rotation, in radians.

Notes

Although texture coordinates will automatically be transformed by the Material's transform, the material transform is exposed as the mat3 lovrMaterialTransform uniform variable in shaders, allowing it to be used for other purposes.

See also