beginTally.lua 904 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'tally',
  3. summary = 'Begin a tally.',
  4. description = [[
  5. Begins a new tally. The tally will count the number of pixels touched by any draws that occur
  6. while the tally is active. If a pixel fails the depth test or stencil test then it won't be
  7. counted, so the tally is a way to detect if objects are visible.
  8. The results for all the tallies in the pass can be copied to a `Buffer` when the Pass finishes
  9. by setting a buffer with `Pass:setTallyBuffer`.
  10. ]],
  11. arguments = {},
  12. returns = {
  13. index = {
  14. type = 'number',
  15. description = 'The index of the tally that was started.'
  16. }
  17. },
  18. variants = {
  19. {
  20. arguments = {},
  21. returns = { 'index' }
  22. }
  23. },
  24. notes = [[
  25. There is currently a maximum of 256 tallies per pass.
  26. If a tally is already active, this function will error.
  27. ]],
  28. related = {
  29. 'Pass:finishTally'
  30. }
  31. }