SceneRenderLayer OverlayWithoutDepth

book_4_sparkGenerated
code_blocksInput

Description

The OverlayWithoutDepth field is a member of the SceneRenderLayer enumeration in the Sandbox namespace. This field represents a rendering layer that is used to draw objects on top of everything else in the scene, after post-processing effects have been applied, but without considering the scene's depth. This means that objects rendered in this layer will appear over all other objects, regardless of their position in the 3D space.

Usage

Use the OverlayWithoutDepth layer when you need to render objects that should always appear on top of other scene elements, such as UI elements or special effects that should not be obscured by other objects. This layer is particularly useful for elements that need to be visible at all times, regardless of the scene's depth or other rendering layers.

Example

// Example of using OverlayWithoutDepth in a component
public class MyOverlayComponent : Component
{
    public override void Render()
    {
        // Set the render layer to OverlayWithoutDepth
        Render.SetLayer(SceneRenderLayer.OverlayWithoutDepth);

        // Render your overlay content here
        // For example, draw a 2D UI element or a special effect
    }
}