Pass:beginTally
EditBegins a new tally. The tally will count the number of pixels touched by any draws that occur while the tally is active. If a pixel fails the depth test or stencil test then it won't be counted, so the tally is a way to detect if objects are visible.
The results for all the tallies in the pass can be copied to a Buffer
when the Pass finishes by setting a buffer with Pass:setTallyBuffer
.
index = Pass:beginTally()
Arguments
None
Returns
Name | Type | Description |
index | number | The index of the tally that was started. |
Notes
There is currently a maximum of 256 tallies per pass.
If a tally is already active, this function will error.