fill.lua 961 B

12345678910111213141516171819202122232425262728293031323334
  1. return {
  2. tag = 'drawing',
  3. summary = 'Draw a fullscreen triangle.',
  4. description = [[
  5. Draws a fullscreen triangle. The `fill` shader is used, which stretches the triangle across the
  6. screen.
  7. ]],
  8. arguments = {
  9. texture = {
  10. type = 'Texture',
  11. description = 'The texture to fill. If nil, the texture from the active material is used.'
  12. }
  13. },
  14. returns = {},
  15. variants = {
  16. {
  17. arguments = { 'texture' },
  18. returns = {}
  19. },
  20. {
  21. arguments = {},
  22. returns = {}
  23. }
  24. },
  25. notes = [[
  26. This function has some special behavior for array textures:
  27. - Filling a single-layer texture to a multi-layer canvas will mirror the texture to all layers,
  28. just like regular drawing.
  29. - Filling a 2-layer texture to a mono canvas will render the 2 layers side-by-side.
  30. - Filling a multi-layer texture to a multi-layer canvas will do a layer-by-layer fill (the layer
  31. counts must match).
  32. ]]
  33. }