Method ClearWithZeros
ClearWithZeros(RenderTexture)
Clears a render texture to zero.
public static void ClearWithZeros(RenderTexture rt)
Parameters
rtRenderTexture
ClearWithZeros(ComputeBuffer)
Clears a compute buffer to zero using the buffer-clear compute shader.
public static void ClearWithZeros(ComputeBuffer buffer)
Parameters
bufferComputeBufferBuffer to clear.
Remarks
The dispatch runs in chunks for large buffers. Vista's runtime typically uses buffers whose counts are multiples of 8 because the shader kernel is organized around 8-thread groups.