Class ImageProcessingConfiguration
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Returns ImageProcessingConfiguration
Properties
color Curves
Color curves setup used in the effect if colorCurvesEnabled is set to true
on Update Parameters
An event triggered when the configuration changes and requires Shader to Update some parameters.
output Texture Height
Height of the output texture used in the post process. If not provided, uses the height of the screen.
output Texture Width
Width of the output texture used in the post process. If not provided, uses the width of the screen.
vignette Camera Fov
Camera field of view used by the Vignette effect.
vignette Center X
Vignette center X Offset.
vignette Center Y
Vignette center Y Offset.
vignette Color
Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode) if vignetteEnabled is set to true.
vignette Stretch
Vignette stretch size.
vignette Weight
Vignette weight or intensity of the vignette effect.
StaticPrepare Samplers
samplersList: string[],
defines: IImageProcessingConfigurationDefines,
) => void = PrepareSamplersForImageProcessing
Prepare the list of samplers associated with the Image Processing effects.
Type Declaration
-
- (samplersList: string[], defines: IImageProcessingConfigurationDefines): void
-
Parameters
- samplersList: string[]
The list of uniforms used in the effect
- defines: IImageProcessingConfigurationDefines
the list of defines currently in use
Returns void
- samplersList: string[]
StaticPrepare Uniforms
uniforms: string[],
defines: IImageProcessingConfigurationDefines,
) => void = PrepareUniformsForImageProcessing
Prepare the list of uniforms associated with the Image Processing effects.
Type Declaration
-
- (uniforms: string[], defines: IImageProcessingConfigurationDefines): void
-
Parameters
- uniforms: string[]
The list of uniforms used in the effect
- defines: IImageProcessingConfigurationDefines
the list of defines currently in use
Returns void
- uniforms: string[]
Static ReadonlyTONEMAPPING_ ACES
ACES Tone mapping (used by default in unreal and unity). This can help getting closer to other engines rendering to increase portability.
Static ReadonlyTONEMAPPING_ KHR_ PBR_ NEUTRAL
Neutral Tone mapping developped by the Khronos group in order to constrain values between 0 and 1 without shifting Hue.
Static ReadonlyTONEMAPPING_ STANDARD
Default tone mapping applied in BabylonJS.
Accessors
apply By Post Process
-
get applyByPostProcess(): boolean
Gets whether the image processing is applied through a post process or not.
Returns boolean
-
set applyByPostProcess(value: boolean): void
Sets whether the image processing is applied through a post process or not.
Parameters
- value: boolean
Returns void
color Curves Enabled
-
get colorCurvesEnabled(): boolean
Gets whether the color curves effect is enabled.
Returns boolean
-
set colorCurvesEnabled(value: boolean): void
Sets whether the color curves effect is enabled.
Parameters
- value: boolean
Returns void
color Grading BGR
-
get colorGradingBGR(): boolean
Gets whether the color grading texture contains BGR values.
Returns boolean
-
set colorGradingBGR(value: boolean): void
Sets whether the color grading texture contains BGR values.
Parameters
- value: boolean
Returns void
color Grading Enabled
-
get colorGradingEnabled(): boolean
Gets whether the color grading effect is enabled.
Returns boolean
-
set colorGradingEnabled(value: boolean): void
Sets whether the color grading effect is enabled.
Parameters
- value: boolean
Returns void
color Grading Texture
-
Color grading LUT texture used in the effect if colorGradingEnabled is set to true
Returns Nullable<BaseTexture>
-
Color grading LUT texture used in the effect if colorGradingEnabled is set to true
Parameters
- value: Nullable<BaseTexture>
Returns void
color Grading With Green Depth
-
get colorGradingWithGreenDepth(): boolean
Gets whether the color grading effect is using a green depth for the 3d Texture.
Returns boolean
-
set colorGradingWithGreenDepth(value: boolean): void
Sets whether the color grading effect is using a green depth for the 3d Texture.
Parameters
- value: boolean
Returns void
contrast
-
get contrast(): number
Gets the contrast used in the effect.
Returns number
-
set contrast(value: number): void
Sets the contrast used in the effect.
Parameters
- value: number
Returns void
dithering Enabled
-
get ditheringEnabled(): boolean
Gets whether the dithering effect is enabled. The dithering effect can be used to reduce banding.
Returns boolean
-
set ditheringEnabled(value: boolean): void
Sets whether the dithering effect is enabled. The dithering effect can be used to reduce banding.
Parameters
- value: boolean
Returns void
dithering Intensity
-
get ditheringIntensity(): number
Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.
Returns number
-
set ditheringIntensity(value: number): void
Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.
Parameters
- value: number
Returns void
exposure
-
get exposure(): number
Gets the Exposure used in the effect.
Returns number
-
set exposure(value: number): void
Sets the Exposure used in the effect.
Parameters
- value: number
Returns void
is Enabled
-
get isEnabled(): boolean
Gets whether the image processing is enabled or not.
Returns boolean
-
set isEnabled(value: boolean): void
Sets whether the image processing is enabled or not.
Parameters
- value: boolean
Returns void
skip Final Color Clamp
-
get skipFinalColorClamp(): boolean
If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader Applies to PBR materials.
Returns boolean
-
set skipFinalColorClamp(value: boolean): void
If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader Applies to PBR materials.
Parameters
- value: boolean
Returns void
temperature
-
get temperature(): number
Gets the correlated color temperature, in Kelvin, of the illuminant to neutralize when whiteBalanceEnabled is set to true - i.e. the light the scene is assumed to have been lit with, not a "warm"/"cool" creative adjustment. Lower values (e.g. ~2000-3500 K) correspond to warm/orange sources such as tungsten or candle light; higher values (e.g. ~7000-10000 K) correspond to cool/blue sources such as shade or overcast sky. Clamped to the tabulated range (roughly 1667 K and above) - the getter reflects the clamped value. Default is 6500.
Returns number
-
set temperature(value: number): void
Sets the correlated color temperature, in Kelvin, of the illuminant to neutralize when whiteBalanceEnabled is set to true - i.e. the light the scene is assumed to have been lit with, not a "warm"/"cool" creative adjustment. Lower values (e.g. ~2000-3500 K) correspond to warm/orange sources such as tungsten or candle light; higher values (e.g. ~7000-10000 K) correspond to cool/blue sources such as shade or overcast sky. Clamped to the tabulated range (roughly 1667 K and above) - the getter reflects the clamped value. Default is 6500.
Parameters
- value: number
Returns void
tint
-
get tint(): number
Gets the white balance tint offset used in the effect if whiteBalanceEnabled is set to true, on the green/magenta axis perpendicular to temperature - e.g. to correct for illuminants (such as some fluorescent lights) that a color temperature alone can't fully neutralize. Positive values shift the corrected image toward magenta (compensating a green-tinted illuminant); negative values shift it toward green (compensating a magenta-tinted illuminant). Clamped to [-150, 150] - the getter reflects the clamped value. Default is 0 (no tint offset).
Returns number
-
set tint(value: number): void
Sets the white balance tint offset used in the effect if whiteBalanceEnabled is set to true, on the green/magenta axis perpendicular to temperature - e.g. to correct for illuminants (such as some fluorescent lights) that a color temperature alone can't fully neutralize. Positive values shift the corrected image toward magenta (compensating a green-tinted illuminant); negative values shift it toward green (compensating a magenta-tinted illuminant). Clamped to [-150, 150] - the getter reflects the clamped value. Default is 0 (no tint offset).
Parameters
- value: number
Returns void
tone Mapping Enabled
-
get toneMappingEnabled(): boolean
Gets whether the tone mapping effect is enabled.
Returns boolean
-
set toneMappingEnabled(value: boolean): void
Sets whether the tone mapping effect is enabled.
Parameters
- value: boolean
Returns void
tone Mapping Type
-
get toneMappingType(): number
Gets the type of tone mapping effect.
Returns number
-
set toneMappingType(value: number): void
Sets the type of tone mapping effect used in BabylonJS.
Parameters
- value: number
Returns void
vignette Blend Mode
-
get vignetteBlendMode(): number
Gets the vignette blend mode allowing different kind of effect.
Returns number
-
set vignetteBlendMode(value: number): void
Sets the vignette blend mode allowing different kind of effect.
Parameters
- value: number
Returns void
vignette Centre X
-
get vignetteCentreX(): number
-
set vignetteCentreX(value: number): void
Parameters
- value: number
Returns void
vignette Centre Y
-
get vignetteCentreY(): number
-
set vignetteCentreY(value: number): void
Parameters
- value: number
Returns void
vignette Enabled
-
get vignetteEnabled(): boolean
Gets whether the vignette effect is enabled.
Returns boolean
-
set vignetteEnabled(value: boolean): void
Sets whether the vignette effect is enabled.
Parameters
- value: boolean
Returns void
white Balance Enabled
-
get whiteBalanceEnabled(): boolean
Gets whether the white balance effect is enabled.
Returns boolean
-
set whiteBalanceEnabled(value: boolean): void
Sets whether the white balance effect is enabled.
Parameters
- value: boolean
Returns void
StaticVIGNETTEMODE_ MULTIPLY
-
get VIGNETTEMODE_MULTIPLY(): number
Used to apply the vignette as a mix with the pixel color.
Returns number
StaticVIGNETTEMODE_ OPAQUE
-
get VIGNETTEMODE_OPAQUE(): number
Used to apply the vignette as a replacement of the pixel color.
Returns number
Methods
bind
-
Binds the image processing to the shader.
Parameters
- effect: Effect
The effect to bind to
OptionaloverrideAspectRatio: numberOverride the aspect ratio of the effect
Returns void
- effect: Effect
clone
-
Clones the current image processing instance.
Returns ImageProcessingConfiguration
The cloned image processing
get Class Name
-
Gets the current class name.
Returns string
"ImageProcessingConfiguration"
is Ready
-
Returns true if all the image processing information are ready.
Returns boolean
True if ready, otherwise, false
prepare Defines
-
Prepare the list of defines associated to the shader.
Parameters
- defines: IImageProcessingConfigurationDefines
the list of defines to complete
- forPostProcess: boolean = false
Define if we are currently in post process mode or not
Returns void
- defines: IImageProcessingConfigurationDefines
serialize
-
Serializes the current image processing instance to a json representation.
Returns any
a JSON representation
This groups together the common properties used for image processing either in direct forward pass or through post processing effect depending on the use of the image processing pipeline in your scene or not.