Material:getTransform
Returns the transformation applied to texture coordinates of the Material.
ox, oy, sx, sy, angle = Material:getTransform()
Arguments
None
Returns
Name | Type | Description |
ox | number | The texture coordinate x offset. |
oy | number | The texture coordinate y offset. |
sx | number | The texture coordinate x scale. |
sy | number | The texture coordinate y scale. |
angle | number | The 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
Material:setTransform
Material