Description
The DepthRead
field is a member of the ResourceState
enumeration within the Sandbox.Rendering
namespace. It represents a specific state of a GPU resource where the resource is set for reading depth data. This state is typically used when a depth buffer is being read by a shader, but not written to.
Usage
Use the DepthRead
state when you need to transition a resource to a state where it can be read for depth information, such as when performing operations that require depth testing or depth-based effects without modifying the depth buffer.
Example
// Example of using ResourceState.DepthRead
void SetResourceStateForDepthRead(Resource resource)
{
// Transition the resource to DepthRead state
resource.TransitionState(ResourceState.DepthRead);
}