ForwardRenderer Class
Namespace: Stride.Rendering.CompositingAssembly: 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
              | Name | Description | |
|---|---|---|
| Fields | ||
| DepthBufferFormat | ||
| viewDepthStencil | ||
| viewOutputTarget | ||
| Properties | ||
| BindDepthAsResourceDuringTransparentRendering | If true, depth buffer generated during OpaqueRenderStage will be available as a shader resource named DepthBase.DepthStencil during TransparentRenderStage.  | 
                          |
| Clear | ||
| GBufferRenderStage | The G-Buffer render stage to render depth buffer and possibly some other extra info to buffers (i.e. normals)  | 
                          |
| LightProbes | Enable Light Probe.  | 
                          |
| LightShafts | Light shafts effect  | 
                          |
| MSAALevel | The level of multi-sampling  | 
                          |
| MSAAResolver | MSAA Resolver is used to resolve multi-sampled render targets into normal render targets  | 
                          |
| OpaqueRenderStage | The main render stage for opaque geometry.  | 
                          |
| PostEffects | The post effects renderer.  | 
                          |
| ShadowMapRenderStages | The shadow map render stages for shadow casters. No shadow rendering will happen if null.  | 
                          |
| SubsurfaceScatteringBlurEffect | Separable subsurface scattering effect  | 
                          |
| TransparentRenderStage | The transparent render stage for transparent geometry.  | 
                          |
| ViewCount | ||
| ViewIndex | ||
| VRSettings | Virtual Reality related settings  | 
                          |
| Methods | ||
| CollectCore(RenderContext) | ||
| CollectStages(RenderContext) | ||
| CollectView(RenderContext) | ||
| ComputeNonMSAADepthFormat(PixelFormat) | ||
| Destroy() | ||
| DrawCore(RenderContext, RenderDrawContext) | ||
| DrawView(RenderContext, RenderDrawContext, Int32, Int32) | ||
| InitializeCore() | ||
| PrepareRenderTargets(RenderDrawContext, Size2) | Prepares targets per frame, caching and handling MSAA etc.  | 
                          |
| ValidateOpaqueStageOutput(RenderOutputValidator, RenderContext) | ||
Fields
DepthBufferFormat
public const PixelFormat DepthBufferFormat = PixelFormat.D24_UNorm_S8_UInt
              Field Value
| Type | Description | 
|---|---|
| PixelFormat | 
viewDepthStencil
protected Texture viewDepthStencil
              Field Value
| Type | Description | 
|---|---|
| Texture | 
viewOutputTarget
protected Texture viewOutputTarget
              Field Value
| Type | Description | 
|---|---|
| Texture | 
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
| Type | Description | 
|---|---|
| System.Boolean | 
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.
Clear
public ClearRenderer Clear { get; set; }
              Property Value
| Type | Description | 
|---|---|
| ClearRenderer | 
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
| Type | Description | 
|---|---|
| RenderStage | 
LightProbes
Enable Light Probe.
public bool LightProbes { get; set; }
              Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
LightShafts
Light shafts effect
public LightShafts LightShafts { get; set; }
              Property Value
| Type | Description | 
|---|---|
| LightShafts | 
MSAALevel
The level of multi-sampling
public MultisampleCount MSAALevel { get; set; }
              Property Value
| Type | Description | 
|---|---|
| MultisampleCount | 
MSAAResolver
MSAA Resolver is used to resolve multi-sampled render targets into normal render targets
public MSAAResolver MSAAResolver { get; }
              Property Value
| Type | Description | 
|---|---|
| MSAAResolver | 
OpaqueRenderStage
The main render stage for opaque geometry.
public RenderStage OpaqueRenderStage { get; set; }
              Property Value
| Type | Description | 
|---|---|
| RenderStage | 
PostEffects
The post effects renderer.
public IPostProcessingEffects PostEffects { get; set; }
              Property Value
| Type | Description | 
|---|---|
| IPostProcessingEffects | 
ShadowMapRenderStages
The shadow map render stages for shadow casters. No shadow rendering will happen if null.
public List<RenderStage> ShadowMapRenderStages { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.List<RenderStage> | 
SubsurfaceScatteringBlurEffect
Separable subsurface scattering effect
public SubsurfaceScatteringBlur SubsurfaceScatteringBlurEffect { get; set; }
              Property Value
| Type | Description | 
|---|---|
| SubsurfaceScatteringBlur | 
TransparentRenderStage
The transparent render stage for transparent geometry.
public RenderStage TransparentRenderStage { get; set; }
              Property Value
| Type | Description | 
|---|---|
| RenderStage | 
ViewCount
protected int ViewCount { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
ViewIndex
protected int ViewIndex { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
VRSettings
Virtual Reality related settings
public VRRendererSettings VRSettings { get; set; }
              Property Value
| Type | Description | 
|---|---|
| VRRendererSettings | 
Methods
CollectCore(RenderContext)
protected override void CollectCore(RenderContext context)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | 
Overrides
CollectStages(RenderContext)
protected virtual void CollectStages(RenderContext context)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | 
CollectView(RenderContext)
protected virtual void CollectView(RenderContext context)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | 
ComputeNonMSAADepthFormat(PixelFormat)
protected static PixelFormat ComputeNonMSAADepthFormat(PixelFormat format)
              Parameters
| Type | Name | Description | 
|---|---|---|
| PixelFormat | format | 
Returns
| Type | Description | 
|---|---|
| PixelFormat | 
Destroy()
protected override void Destroy()
              Overrides
DrawCore(RenderContext, RenderDrawContext)
protected override void DrawCore(RenderContext context, RenderDrawContext drawContext)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | |
| RenderDrawContext | drawContext | 
Overrides
DrawView(RenderContext, RenderDrawContext, Int32, Int32)
protected virtual void DrawView(RenderContext context, RenderDrawContext drawContext, int eyeIndex, int eyeCount)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | |
| RenderDrawContext | drawContext | |
| System.Int32 | eyeIndex | |
| System.Int32 | eyeCount | 
InitializeCore()
protected override void InitializeCore()
              Overrides
PrepareRenderTargets(RenderDrawContext, Size2)
Prepares targets per frame, caching and handling MSAA etc.
protected virtual void PrepareRenderTargets(RenderDrawContext drawContext, Size2 renderTargetsSize)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderDrawContext | drawContext | The current draw context  | 
                  
| Size2 | renderTargetsSize | The render target size  | 
                  
ValidateOpaqueStageOutput(RenderOutputValidator, RenderContext)
protected virtual void ValidateOpaqueStageOutput(RenderOutputValidator renderOutputValidator, RenderContext renderContext)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderOutputValidator | renderOutputValidator | |
| RenderContext | renderContext |