setColorWrite.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. return {
  2. tag = 'pipeline',
  3. summary = 'Change the color channels affected by drawing.',
  4. description = [[
  5. Sets the color channels affected by drawing, on a per-channel basis. Disabling color writes is
  6. often used to render to the depth or stencil buffer without affecting existing pixel colors.
  7. ]],
  8. arguments = {
  9. index = {
  10. type = 'number',
  11. description = 'The index of the canvas texture to update.'
  12. },
  13. r = {
  14. type = 'boolean',
  15. description = 'Whether the red component should be affected by draws.'
  16. },
  17. g = {
  18. type = 'boolean',
  19. description = 'Whether the green component should be affected by draws.'
  20. },
  21. b = {
  22. type = 'boolean',
  23. description = 'Whether the blue component should be affected by draws.'
  24. },
  25. a = {
  26. type = 'boolean',
  27. description = 'Whether the alpha component should be affected by draws.'
  28. },
  29. enable = {
  30. type = 'boolean',
  31. description = 'Whether all color components should be affected by draws.'
  32. }
  33. },
  34. returns = {},
  35. variants = {
  36. {
  37. arguments = { 'enable' },
  38. returns = {}
  39. },
  40. {
  41. arguments = { 'r', 'g', 'b', 'a' },
  42. returns = {}
  43. },
  44. {
  45. arguments = { 'index', 'enable' },
  46. returns = {}
  47. },
  48. {
  49. arguments = { 'index', 'r', 'g', 'b', 'a' },
  50. returns = {}
  51. }
  52. },
  53. notes = 'By default, color writes are enabled for all channels.',
  54. related = {
  55. 'Pass:setDepthWrite',
  56. 'Pass:setStencilWrite'
  57. }
  58. }