Description
The OverlayWithoutDepth
field is a member of the SceneRenderLayer
enumeration in the Sandbox namespace. It represents a rendering layer that is applied after post-processing effects, but without considering the scene's depth. This means that objects rendered in this layer will appear on top of all other elements, effectively drawing over them without any depth-based occlusion.
Usage
Use the OverlayWithoutDepth
layer when you need to render elements that should always appear on top of other scene elements, regardless of their position in 3D space. This is particularly useful for UI elements or other overlays that should not be obscured by other objects in the scene.
Example
// Example of using SceneRenderLayer.OverlayWithoutDepth
public class MyOverlayComponent : Component
{
public override void Render()
{
// Set the render layer to OverlayWithoutDepth
Render.SetRenderLayer(SceneRenderLayer.OverlayWithoutDepth);
// Render your overlay content here
// This content will appear on top of all other scene elements
}
}