Class ForwardRenderer
- Namespace
- Stride.Rendering.Compositing
- Assembly
- Stride.Engine.dll
Renders your game. It should use current RenderView and GetCurrentCamera(RenderContext).
[Display("Forward renderer", null)]
public class ForwardRenderer : SceneRendererBase, IComponent, IReferencable, ICollectorHolder, ISceneRenderer, IRenderCollector, IGraphicsRenderer, IGraphicsRendererCore, IDisposable, ISharedRenderer, IIdentifiable, IGraphicsRendererBase
- Inheritance
-
ForwardRenderer
- Implements
- Inherited Members
- Extension Methods
Fields
DepthBufferFormat
public const PixelFormat DepthBufferFormat = D24_UNorm_S8_UInt
Field Value
viewDepthStencil
protected Texture viewDepthStencil
Field Value
viewOutputTarget
protected Texture viewOutputTarget
Field Value
Properties
BindDepthAsResourceDuringTransparentRendering
If true, depth buffer generated during OpaqueRenderStage will be available as a shader resource named DepthBase.DepthStencil during TransparentRenderStage.
public bool BindDepthAsResourceDuringTransparentRendering { get; set; }
Property Value
Remarks
This is needed by some effects such as particles soft edges.
On recent platforms that can bind depth buffer as read-only (HasDepthAsReadOnlyRT), depth buffer will be used as is. Otherwise, a copy will be generated.
BindOpaqueAsResourceDuringTransparentRendering
If true, render target generated during OpaqueRenderStage will be available as a shader resource named OpaqueBase.OpaqueRenderTarget during TransparentRenderStage.
public bool BindOpaqueAsResourceDuringTransparentRendering { get; set; }
Property Value
Clear
public ClearRenderer Clear { get; set; }
Property Value
GBufferRenderStage
The G-Buffer render stage to render depth buffer and possibly some other extra info to buffers (i.e. normals)
public RenderStage GBufferRenderStage { get; set; }
Property Value
LightProbes
Enable Light Probe.
public bool LightProbes { get; set; }
Property Value
LightShafts
Light shafts effect
public LightShafts LightShafts { get; set; }
Property Value
MSAALevel
The level of multi-sampling
public MultisampleCount MSAALevel { get; set; }
Property Value
MSAAResolver
MSAA Resolver is used to resolve multi-sampled render targets into normal render targets
public MSAAResolver MSAAResolver { get; }
Property Value
OpaqueRenderStage
The main render stage for opaque geometry.
public RenderStage OpaqueRenderStage { get; set; }
Property Value
PostEffects
The post effects renderer.
public IPostProcessingEffects PostEffects { get; set; }
Property Value
ShadowMapRenderStages
The shadow map render stages for shadow casters. No shadow rendering will happen if null.
public List<RenderStage> ShadowMapRenderStages { get; }
Property Value
SubsurfaceScatteringBlurEffect
Separable subsurface scattering effect
public SubsurfaceScatteringBlur SubsurfaceScatteringBlurEffect { get; set; }
Property Value
TransparentRenderStage
The transparent render stage for transparent geometry.
public RenderStage TransparentRenderStage { get; set; }
Property Value
VRSettings
Virtual Reality related settings
public VRRendererSettings VRSettings { get; set; }
Property Value
ViewCount
protected int ViewCount { get; }
Property Value
ViewIndex
protected int ViewIndex { get; }
Property Value
Methods
CollectCore(RenderContext)
Main collect method.
protected override void CollectCore(RenderContext context)
Parameters
context
RenderContext
CollectStages(RenderContext)
protected virtual void CollectStages(RenderContext context)
Parameters
context
RenderContext
CollectView(RenderContext)
protected virtual void CollectView(RenderContext context)
Parameters
context
RenderContext
ComputeNonMSAADepthFormat(PixelFormat)
protected static PixelFormat ComputeNonMSAADepthFormat(PixelFormat format)
Parameters
format
PixelFormat
Returns
Destroy()
Disposes of object resources.
protected override void Destroy()
DrawCore(RenderContext, RenderDrawContext)
Main drawing method for this renderer that must be implemented.
protected override void DrawCore(RenderContext context, RenderDrawContext drawContext)
Parameters
context
RenderContextdrawContext
RenderDrawContext
DrawView(RenderContext, RenderDrawContext, int, int)
protected virtual void DrawView(RenderContext context, RenderDrawContext drawContext, int eyeIndex, int eyeCount)
Parameters
context
RenderContextdrawContext
RenderDrawContexteyeIndex
inteyeCount
int
InitializeCore()
protected override void InitializeCore()
PrepareRenderTargets(RenderDrawContext, Size2)
Prepares targets per frame, caching and handling MSAA etc.
protected virtual void PrepareRenderTargets(RenderDrawContext drawContext, Size2 renderTargetsSize)
Parameters
drawContext
RenderDrawContextThe current draw context
renderTargetsSize
Size2The render target size
ValidateOpaqueStageOutput(RenderOutputValidator, RenderContext)
protected virtual void ValidateOpaqueStageOutput(RenderOutputValidator renderOutputValidator, RenderContext renderContext)
Parameters
renderOutputValidator
RenderOutputValidatorrenderContext
RenderContext