getTransform.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. return {
  2. summary = 'Get the transformation applied to texture coordinates.',
  3. description = 'Returns the transformation applied to texture coordinates of the Material.',
  4. arguments = {},
  5. returns = {
  6. {
  7. name = 'ox',
  8. type = 'number',
  9. description = 'The texture coordinate x offset.'
  10. },
  11. {
  12. name = 'oy',
  13. type = 'number',
  14. description = 'The texture coordinate y offset.'
  15. },
  16. {
  17. name = 'sx',
  18. type = 'number',
  19. description = 'The texture coordinate x scale.'
  20. },
  21. {
  22. name = 'sy',
  23. type = 'number',
  24. description = 'The texture coordinate y scale.'
  25. },
  26. {
  27. name = 'angle',
  28. type = 'number',
  29. description = 'The texture coordinate rotation, in radians.'
  30. }
  31. },
  32. notes = [[
  33. Although texture coordinates will automatically be transformed by the Material's transform, the
  34. material transform is exposed as the `mat3 lovrMaterialTransform` uniform variable in shaders,
  35. allowing it to be used for other purposes.
  36. ]]
  37. }