Description
The Depth
field is a member of the ClearFlags
enumeration in the Sandbox namespace. It represents the depth buffer, which is used to determine the depth of objects in a 3D scene. This flag is used to clear the depth buffer before rendering a scene, ensuring that depth calculations are accurate for the current frame.
Usage
Use the ClearFlags.Depth
flag when you need to clear the depth buffer before rendering a new frame. This is typically necessary when rendering 3D scenes to ensure that depth information from previous frames does not interfere with the current frame's rendering.
Example
// Example of using ClearFlags.Depth
SceneCamera camera = new SceneCamera();
camera.ClearFlags = ClearFlags.Depth;
// This will clear the depth buffer before rendering the scene
camera.Render();