Description
The Attributes
property of the ComputeShader
class represents the RenderAttributes
that are passed to the compute shader when it is dispatched. These attributes can be used to configure various rendering parameters and settings that the shader will use during its execution.
Usage
To use the Attributes
property, you first need to create an instance of the ComputeShader
class. You can then set or get the Attributes
property to specify or retrieve the rendering attributes for the shader.
Example usage:
ComputeShader computeShader = new ComputeShader();
RenderAttributes renderAttributes = new RenderAttributes();
// Configure renderAttributes as needed
computeShader.Attributes = renderAttributes;
// Dispatch the compute shader with the specified attributes
computeShader.DispatchWithAttributes(renderAttributes, 8, 8, 1);
Example
ComputeShader computeShader = new ComputeShader();
RenderAttributes renderAttributes = new RenderAttributes();
// Configure renderAttributes as needed
computeShader.Attributes = renderAttributes;
// Dispatch the compute shader with the specified attributes
computeShader.DispatchWithAttributes(renderAttributes, 8, 8, 1);