Description
The Stencil
field is a member of the ClearFlags
enumeration in the Sandbox namespace. It represents the stencil buffer, which is used in graphics programming to control the drawing of pixels based on certain conditions. This field is part of the flags used to specify which buffers should be cleared before rendering a scene using a SceneCamera
.
Usage
Use the Stencil
flag when you need to clear the stencil buffer before rendering a scene. This is typically used in advanced rendering techniques where stencil operations are required to achieve certain visual effects.
Example
// Example of using ClearFlags with a SceneCamera
SceneCamera camera = new SceneCamera();
camera.ClearFlags = ClearFlags.Color | ClearFlags.Stencil;
// This will clear both the color and stencil buffers before rendering the scene.