Default3DDeferredRenderPass

Warning

This documentation is for an implementation of a service. This class is not meant to be used directly; instead use the I3DRenderPass service via dependency injection to access this functionality.

Information documented here may not be up to date.

class Default3DDeferredRenderPass : System.Object, I3DDeferredRenderPass, I3DBatchedRenderPass, I3DRenderPass, IRenderPass, Protogame.IRenderPassWithViewport

The implementation of T:Protogame.I3DRenderPass which uses deferred rendering.

readonly bool IsPostProcessingPass
readonly bool SkipWorldRenderBelow
readonly bool SkipWorldRenderAbove
readonly bool SkipEntityRender
readonly bool SkipEngineHookRender
readonly string EffectTechniqueName
System.Nullable<Viewport> Viewport
bool DebugGBuffer
bool ClearDepthBuffer

Clear the depth buffer before this render pass starts rendering. This allows you to alpha blend a 3D deferred render pass on top of a 2D render pass, without the 2D render pass interfering with the rendering of 3D objects.

bool ClearTarget

Clear the target before this render pass starts rendering. If your scene doesn’t fully cover the scene this should be turned on (unless you want what was previously rendered to remain on screen). This is on by default.

BlendState GBufferBlendState

The blend state to use when rendering the final G-buffer onto the backbuffer (or current render target). By default this is opaque, which is probably what you want if the deferred rendering pass is the first in the pipeline. However if you’re rendering 2D content underneath the 3D content, you should set this to something like F:Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend.

string Name
public void BeginRenderPass(IGameContext gameContext, IRenderContext renderContext, IRenderPass previousPass, RenderTarget2D postProcessingSource)
Parameters:
  • gameContext (Protogame.IGameContext) –
  • renderContext (Protogame.IRenderContext) –
  • previousPass (Protogame.IRenderPass) –
  • postProcessingSource (Microsoft.Xna.Framework.Graphics.RenderTarget2D) –
public void EndRenderPass(IGameContext gameContext, IRenderContext renderContext, IRenderPass nextPass)
Parameters:
  • gameContext (Protogame.IGameContext) –
  • renderContext (Protogame.IRenderContext) –
  • nextPass (Protogame.IRenderPass) –