fill.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. return {
  2. tag = 'graphicsPrimitives',
  3. summary = 'Fill the screen with a texture.',
  4. description = 'Draws a fullscreen textured quad.',
  5. arguments = {
  6. texture = {
  7. type = 'Texture',
  8. description = 'The texture to use.'
  9. },
  10. u = {
  11. type = 'number',
  12. default = '0',
  13. description = 'The x component of the uv offset.'
  14. },
  15. v = {
  16. type = 'number',
  17. default = '0',
  18. description = 'The y component of the uv offset.'
  19. },
  20. w = {
  21. type = 'number',
  22. default = '1 - u',
  23. description = 'The width of the Texture to render, in uv coordinates.'
  24. },
  25. h = {
  26. type = 'number',
  27. default = '1 - v',
  28. description = 'The height of the Texture to render, in uv coordinates.'
  29. }
  30. },
  31. returns = {},
  32. variants = {
  33. {
  34. description = 'Fills the screen with a region of a Texture.',
  35. arguments = { 'texture', 'u', 'v', 'w', 'h' },
  36. returns = {}
  37. },
  38. {
  39. description = 'Fills the screen with the active color.',
  40. arguments = {},
  41. returns = {}
  42. }
  43. },
  44. notes = [[
  45. This function ignores stereo rendering, so it will stretch the input across the entire Canvas if
  46. it's stereo. Special shaders are currently required for correct stereo fills.
  47. ]]
  48. }