Class DefaultRenderingPipeline
Hierarchy (View Summary)
- PostProcessRenderPipeline
- DefaultRenderingPipeline
Implements
Constructors
constructor
-
new DefaultRenderingPipeline(
name?: string,
hdr?: boolean,
scene?: Scene,
cameras?: Camera[],
automaticBuild?: boolean,
): DefaultRenderingPipelineInstantiates a DefaultRenderingPipeline.
Parameters
- name: string = ""
The rendering pipeline name (default: "")
- hdr: boolean = true
If high dynamic range textures should be used (default: true)
- scene: Scene = ...
The scene linked to this pipeline (default: the last created scene)
Optionalcameras: Camera[]The array of cameras that the rendering pipeline will be attached to (default: scene.cameras)
- automaticBuild: boolean = true
If false, you will have to manually call prepare() to update the pipeline (default: true)
Returns DefaultRenderingPipeline
- name: string = ""
Properties
animations
Animations which can be used to tweak settings over a period of time
chromatic Aberration
Chromatic aberration post process which will shift rgb colors in the image
depth Of Field
Depth of field effect, applies a blur based on how far away objects are from the focus distance.
fxaa
The Fast Approximate Anti-Aliasing post process which attempts to remove aliasing from an image.
ReadonlyFxaa Post Process Id
grain
Grain post process which add noise to the image
image Processing
Image post processing pass used to perform operations such as tone mapping or color grading.
ReadonlyImage Processing Post Process Id
inspectable Custom Properties
List of inspectable custom properties (used by the Inspector)
on Build Observable
This is triggered each time the pipeline has been built.
sharpen
Sharpen post process which will apply a sharpen convolution to enhance edges
Readonlyunique Id
Gets the unique id of the post process rendering pipeline
Accessors
automatic Build
-
get automaticBuild(): boolean
Enable or disable automatic building of the pipeline when effects are enabled and disabled. If false, you will have to manually call prepare() to update the pipeline.
Returns boolean
-
set automaticBuild(value: boolean): void
Parameters
- value: boolean
Returns void
bloom Enabled
-
get bloomEnabled(): boolean
Returns boolean
-
set bloomEnabled(enabled: boolean): void
Enable or disable the bloom from the pipeline
Parameters
- enabled: boolean
Returns void
bloom Kernel
-
get bloomKernel(): number
Specifies the size of the bloom blur kernel, relative to the final output size
Returns number
-
set bloomKernel(value: number): void
Parameters
- value: number
Returns void
bloom Scale
-
get bloomScale(): number
Returns number
-
set bloomScale(value: number): void
The scale of the bloom, lower value will provide better performance.
Parameters
- value: number
Returns void
bloom Threshold
-
get bloomThreshold(): number
Returns number
-
set bloomThreshold(value: number): void
The luminance threshold to find bright areas of the image to bloom.
Parameters
- value: number
Returns void
bloom Weight
-
get bloomWeight(): number
Returns number
-
set bloomWeight(value: number): void
The strength of the bloom.
Parameters
- value: number
Returns void
cameras
-
Gets the list of attached cameras
Returns Camera[]
chromatic Aberration Enabled
-
get chromaticAberrationEnabled(): boolean
Returns boolean
-
set chromaticAberrationEnabled(enabled: boolean): void
Enable or disable the chromaticAberration process from the pipeline
Parameters
- enabled: boolean
Returns void
depth Of Field Blur Level
-
Blur level of the depth of field effect. (Higher blur will effect performance)
Returns DepthOfFieldEffectBlurLevel
-
Parameters
- value: DepthOfFieldEffectBlurLevel
Returns void
depth Of Field Enabled
-
get depthOfFieldEnabled(): boolean
If the depth of field is enabled.
Returns boolean
-
set depthOfFieldEnabled(enabled: boolean): void
Parameters
- enabled: boolean
Returns void
engine
-
Gets the active engine
Returns AbstractEngine
fxaa Enabled
-
get fxaaEnabled(): boolean
Returns boolean
-
set fxaaEnabled(enabled: boolean): void
If the anti aliasing is enabled.
Parameters
- enabled: boolean
Returns void
glow Layer
glow Layer Enabled
-
get glowLayerEnabled(): boolean
Returns boolean
-
set glowLayerEnabled(enabled: boolean): void
If glow layer is enabled. (Adds a glow effect to emmissive materials)
Parameters
- enabled: boolean
Returns void
grain Enabled
-
get grainEnabled(): boolean
Returns boolean
-
set grainEnabled(enabled: boolean): void
Enable or disable the grain process from the pipeline
Parameters
- enabled: boolean
Returns void
image Processing Enabled
-
get imageProcessingEnabled(): boolean
Returns boolean
-
set imageProcessingEnabled(enabled: boolean): void
If image processing is enabled.
Parameters
- enabled: boolean
Returns void
is Supported
-
get isSupported(): boolean
If all the render effects in the pipeline are supported
Returns boolean
name
-
get name(): string
Gets pipeline name
Returns string
samples
-
get samples(): number
Returns number
-
set samples(sampleCount: number): void
MSAA sample count, setting this to 4 will provide 4x anti aliasing. (default: 1)
Parameters
- sampleCount: number
Returns void
scene
-
Gets active scene
Returns Scene
sharpen Enabled
-
get sharpenEnabled(): boolean
Returns boolean
-
set sharpenEnabled(enabled: boolean): void
Enable or disable the sharpen process from the pipeline
Parameters
- enabled: boolean
Returns void
Methods
add Camera
add Effect
-
Adds an effect to the pipeline
Parameters
- renderEffect: PostProcessRenderEffect
the effect to add
Returns void
- renderEffect: PostProcessRenderEffect
dispose
-
Dispose of the pipeline and stop all post processes
Returns void
get Class Name
-
Get the class name
Returns string
"DefaultRenderingPipeline"
prepare
-
Force the compilation of the entire pipeline.
Returns void
remove Camera
serialize
-
Serialize the rendering pipeline (Used when exporting)
Returns any
the serialized object
set Pre Pass Renderer
-
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.
- prePassRenderer: PrePassRenderer
The default rendering pipeline can be added to a scene to apply common post processing effects such as anti-aliasing or depth of field. See https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/defaultRenderingPipeline