Class PrePassRenderer
Hierarchy
- PrePassRenderer
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Instanciates a prepass renderer
Parameters
-
scene: Scene
The scene
Returns PrePassRenderer
-
Properties
defaultRTSearch playground for defaultRT
The render target where the scene is directly rendered
disable Gamma TransformSearch playground for disableGammaTransform
Set to true to disable gamma transform in PrePass. Can be useful in case you already proceed to gamma transform on a material level and your post processes don't need to be in linear color space.
do Not Use Geometry Renderer FallbackSearch playground for doNotUseGeometryRendererFallback
Prevents the PrePassRenderer from using the GeometryBufferRenderer as a fallback
excluded MaterialsSearch playground for excludedMaterials
Force material to be excluded from the prepass
Can be useful when useGeometryBufferFallback
is set to true
and you don't want a material to show in the effect.
excluded Skinned MeshSearch playground for excludedSkinnedMesh
To save performance, we can excluded skinned meshes from the prepass
mrt CountSearch playground for mrtCount
Number of textures in the multi render target texture where the scene is directly rendered
render TargetsSearch playground for renderTargets
All the render targets generated by prepass
Accessors
currentRTis SceneRT
-
Returns true if the currently rendered prePassRenderTarget is the one associated with the scene.
Returns boolean
enabled
-
Indicates if the prepass is enabled
Returns boolean
is Supported
-
Indicates if rendering a prepass is supported
Returns boolean
samples
-
How many samples are used for MSAA of the scene render target
Returns number
-
How many samples are used for MSAA of the scene render target
Parameters
-
n: number
Returns any
-
Methods
add Effect ConfigurationSearch playground for addEffectConfiguration
-
Adds an effect configuration to the prepass render target. If an effect has already been added, it won't add it twice and will return the configuration already present.
Parameters
-
cfg: PrePassEffectConfiguration
the effect configuration
Returns PrePassEffectConfiguration
the effect configuration now used by the prepass
-
bind Attachments For EffectSearch playground for bindAttachmentsForEffect
disposeSearch playground for dispose
-
Disposes the prepass renderer.
Returns void
get IndexSearch playground for getIndex
-
Returns the index of a texture in the multi render target texture array.
Parameters
-
type: number
Texture type
Returns number
The index
-
get Render TargetSearch playground for getRenderTarget
-
Returns PrePassRenderTarget
the prepass render target for the rendering pass. If we are currently rendering a render target, it returns the PrePassRenderTarget associated with that render target. Otherwise, it returns the scene default PrePassRenderTarget
mark AsDirtySearch playground for markAsDirty
-
Marks the prepass renderer as dirty, triggering a check if the prepass is necessary for the next rendering.
Returns void
restore AttachmentsSearch playground for restoreAttachments
-
Restores attachments for single texture draw.
Returns void
Renders a pre pass of the scene This means every mesh in the scene will be rendered to a render target texture And then this texture will be composited to the rendering canvas with post processes It is necessary for effects like subsurface scattering or deferred shading