Class GraphicsCompositorHelper2D
- Namespace
- Stride.CommunityToolkit.Engine
- Assembly
- Stride.CommunityToolkit.dll
Provides helper methods for creating and configuring 2D graphics compositors.
public static class GraphicsCompositorHelper2D
- Inheritance
-
GraphicsCompositorHelper2D
Remarks
This class includes methods to create default configurations for graphics compositors, allowing customization of rendering options such as post-processing effects, model effects, and camera settings.
Methods
CreateDefault(bool, string, CameraComponent?, Color4?, RenderGroupMask)
Creates a default GraphicsCompositor configured with specified rendering options.
public static GraphicsCompositor CreateDefault(bool enablePostEffects = false, string modelEffectName = "StrideForwardShadingEffect", CameraComponent? camera = null, Color4? clearColor = null, RenderGroupMask groupMask = RenderGroupMask.All)
Parameters
enablePostEffectsboolIf true, post-processing effects such as tone mapping are enabled; otherwise, they are disabled.
modelEffectNamestringThe name of the effect used for rendering models. Defaults to "StrideForwardShadingEffect".
cameraCameraComponentAn optional CameraComponent to be associated with the compositor. If provided, it will be assigned to a camera slot.
clearColorColor4?The color used to clear the screen. Defaults to CornflowerBlue if not specified.
groupMaskRenderGroupMaskSpecifies the render group mask to be used for rendering. Defaults to All.
Returns
- GraphicsCompositor
A GraphicsCompositor instance configured with the specified options, including render stages and features for opaque and transparent objects.