Class GraphicsCompositor
- Namespace
- Stride.Rendering.Compositing
- Assembly
- Stride.Engine.dll
The GraphicsCompositor
class organizes how scenes are rendered in the Stride engine, providing extensive customization of the rendering pipeline.
[DataSerializerGlobal(typeof(ReferenceSerializer<GraphicsCompositor>), null, DataSerializerGenericMode.None, false, false, Profile = "Content")]
[ContentSerializer(typeof(DataContentSerializerWithReuse<GraphicsCompositor>))]
[DataContract]
[DataSerializerGlobal(null, typeof(FastTrackingCollection<RenderStage>), DataSerializerGenericMode.None, false, false)]
[DataSerializerGlobal(null, typeof(FastTrackingCollection<RootRenderFeature>), DataSerializerGenericMode.None, false, false)]
public class GraphicsCompositor : RendererBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
- Inheritance
-
GraphicsCompositor
- Implements
- Inherited Members
- Extension Methods
Remarks
This class handles the initialization and destruction of the render system, manages the cameras used in the composition, and controls the render stages and features. It provides entry points for the game compositor, a single view compositor, and a compositor used by the scene editor.
Key features of the GraphicsCompositor
include:
- Using one or multiple cameras
- Filtering entities
- Rendering to one or more render textures with different viewports
- Setting HDR or LDR rendering
- Applying post effects to a render target
- Clearing a render target or only the depth buffer
- Editable in the Game Studio and at runtime from scripts
For more information, see the Graphics Compositor documentation.
Fields
Current
A property key to get the current GraphicsCompositor from the Tags.
public static readonly PropertyKey<GraphicsCompositor> Current
Field Value
Properties
Cameras
Gets the cameras used by this composition.
[DataMember(10)]
public SceneCameraSlotCollection Cameras { get; }
Property Value
- SceneCameraSlotCollection
The cameras.
Editor
The entry point for a compositor used by the scene editor.
public ISceneRenderer Editor { get; set; }
Property Value
Game
The entry point for the game compositor.
public ISceneRenderer Game { get; set; }
Property Value
RenderFeatures
The list of render features.
[DataMember(30)]
public IList<RootRenderFeature> RenderFeatures { get; }
Property Value
RenderStages
The list of render stages.
[DataMember(20)]
public IList<RenderStage> RenderStages { get; }
Property Value
RenderSystem
Gets the render system used with this graphics compositor.
public RenderSystem RenderSystem { get; }
Property Value
SingleView
The entry point for a compositor that can render a single view.
public ISceneRenderer SingleView { get; set; }
Property Value
Methods
Destroy()
Disposes of object resources.
protected override void Destroy()
DrawCore(RenderDrawContext)
Main drawing method for this renderer that must be implemented.
protected override void DrawCore(RenderDrawContext context)
Parameters
context
RenderDrawContextThe context.
InitializeCore()
protected override void InitializeCore()