Class SSAO2RenderingPipeline
Hierarchy
- PostProcessRenderPipeline
- SSAO2RenderingPipeline
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
name: string
The rendering pipeline name
scene: Scene
The scene linked to this pipeline
ratio: any
The size of the postprocesses. Can be a number shared between passes or an object for more precision: { ssaoRatio: 0.5, blurRatio: 1.0 }
Optional cameras: Camera[]
The array of cameras that the rendering pipeline will be attached to
Optional forceGeometryBuffer: boolean
Set to true if you want to use the legacy geometry buffer renderer
Optional textureType: number
The texture type used by the different post processes created by SSAO (default: Constants.TEXTURETYPE_UNSIGNED_INT)
Returns SSAO2RenderingPipeline
Properties
baseSearch playground for base
The base color of the SSAO post-process The final result is "base + ssao" between [0, 1]
bilateral SamplesSearch playground for bilateralSamples
The number of samples the bilateral filter uses in both dimensions when denoising the SSAO calculations. Default value is 16.
A higher value should result in smoother shadows but will use more processing time in the shaders.
A high value can cause the shadows to get to blurry or create visible artifacts (bands) near sharp details in the geometry. The artifacts can sometimes be mitigated by increasing the bilateralSoften setting.
bilateral SoftenSearch playground for bilateralSoften
Controls the shape of the denoising kernel used by the bilateral filter. Default value is 0.
By default the bilateral filter acts like a box-filter, treating all samples on the same depth with equal weights. This is effective to maximize the denoising effect given a limited set of samples. However, it also often results in visible ghosting around sharp shadow regions and can spread out lines over large areas so they are no longer visible.
Increasing this setting will make the filter pay less attention to samples further away from the center sample, reducing many artifacts but at the same time increasing noise.
Useful value range is [0..1].
bilateral ToleranceSearch playground for bilateralTolerance
How forgiving the bilateral denoiser should be when rejecting samples. Default value is 0.
A higher value results in the bilateral filter being more forgiving and thus doing a better job at denoising slanted and curved surfaces, but can lead to shadows spreading out around corners or between objects that are close to each other depth wise.
Useful value range is normally [0..1], but higher values are allowed.
inspectable Custom PropertiesSearch playground for inspectableCustomProperties
List of inspectable custom properties (used by the Inspector)
maxZSearch playground for maxZ
Maximum depth value to still render AO. A smooth falloff makes the dimming more natural, so there will be no abrupt shading change.
minZAspectSearch playground for minZAspect
In order to save performances, SSAO radius is clamped on close geometry. This ratio changes by how much.
radiusSearch playground for radius
The radius around the analyzed pixel used by the SSAO post-process. Default value is 2.0
total StrengthSearch playground for totalStrength
The output strength of the SSAO post-process. Default value is 1.0.
Accessors
bypass Blur
Skips the denoising (blur) stage of the SSAO calculations.
Useful to temporarily set while experimenting with the other SSAO2 settings.
Returns boolean
Skips the denoising (blur) stage of the SSAO calculations.
Useful to temporarily set while experimenting with the other SSAO2 settings.
Parameters
b: boolean
Returns void
cameras
Gets the list of attached cameras
Returns Camera[]
epsilon
Used in SSAO calculations to compensate for accuracy issues with depth values. Default 0.02.
Normally you do not need to change this value, but you can experiment with it if you get a lot of in false self-occlusion on flat surfaces when using fewer than 16 samples. Useful range is normally [0..0.1] but higher values is allowed.
Returns number
Used in SSAO calculations to compensate for accuracy issues with depth values. Default 0.02.
Normally you do not need to change this value, but you can experiment with it if you get a lot of in false self-occlusion on flat surfaces when using fewer than 16 samples. Useful range is normally [0..0.1] but higher values is allowed.
Parameters
n: number
Returns void
expensive Blur
Enables the configurable bilateral denoising (blurring) filter. Default is true. Set to false to instead use a legacy bilateral filter that can't be configured.
The denoising filter runs after the SSAO calculations and is a very important step. Both options results in a so called bilateral being used, but the "expensive" one can be configured in several ways to fit your scene.
Returns boolean
Enables the configurable bilateral denoising (blurring) filter. Default is true. Set to false to instead use a legacy bilateral filter that can't be configured.
The denoising filter runs after the SSAO calculations and is a very important step. Both options results in a so called bilateral being used, but the "expensive" one can be configured in several ways to fit your scene.
Parameters
b: boolean
Returns void
is Supported
If all the render effects in the pipeline are supported
Returns boolean
name
Gets pipeline name
Returns string
samples
Number of samples used for the SSAO calculations. Default value is 8.
Returns number
Number of samples used for the SSAO calculations. Default value is 8.
Parameters
n: number
Returns void
scene
Gets active scene
Returns Scene
texture Samples
Number of samples to use for antialiasing.
Returns number
Number of samples to use for antialiasing.
Parameters
n: number
Returns void
Static Is Supported
Support test.
Returns boolean
Methods
add EffectSearch playground for addEffect
Adds an effect to the pipeline
Parameters
renderEffect: PostProcessRenderEffect
the effect to add
Returns void
disposeSearch playground for dispose
Removes the internal pipeline assets and detaches the pipeline from the scene cameras
Parameters
Optional disableGeometryBufferRenderer: boolean
Returns void
get Class NameSearch playground for getClassName
Get the class name
Returns string
"SSAO2RenderingPipeline"
serializeSearch playground for serialize
Serialize the rendering pipeline (Used when exporting)
Returns any
the serialized object
set Pre Pass RendererSearch playground for setPrePassRenderer
Sets the required values to the prepass renderer.
Parameters
prePassRenderer: PrePassRenderer
defines the prepass renderer to setup.
Returns boolean
true if the pre pass is needed.
Static ParseSearch playground for Parse
Parse the serialized pipeline
Parameters
source: any
Source pipeline.
scene: Scene
The scene to load the pipeline to.
rootUrl: string
The URL of the serialized pipeline.
Returns SSAO2RenderingPipeline
An instantiated pipeline from the serialized object.
Render pipeline to produce ssao effect