lets say if I set setVisibilityResultMode:MTLVisibilityResultModeBoolean offset:0
and then call draw with instances:
drawIndexedPrimitives: ... instanceCount:10
Is it going to write one value into visibilityResultBuffer
or 10 values?
Hi, there should only be one value written to the visibilityResultBuffer as the offset is determined by calling setVisibilityMode
. The number stored in this location is dependent upon the MTLVisibilityResultMode
enum which can be MTLVisibilityModeNone
, MTLVisibilityModeBoolean
, or MTLVisibilityModeCounting
. The documentation does not indicate that the offset will be changed or incremented with instanced drawing.