Class GraphicsCompositorHelper2D
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, MultisampleCount)
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, MultisampleCount msaa = MultisampleCount.None)
Parameters
enablePostEffectsboolIf true, adds post effects with everything off except the colour-transform group, whose tone map is also off; otherwise, adds none.
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.
msaaMultisampleCountMultisample anti-aliasing level for the forward renderer. Defaults to None. Thin geometry - lines drawn as narrow quads, small sprites - flickers as it moves without it, because a shape narrower than a pixel is only drawn when it happens to cover the pixel's centre. The level is clamped to what the graphics device supports.
Returns
- GraphicsCompositor
A GraphicsCompositor instance configured with the specified options, including render stages and features for opaque and transparent objects.