Class FluidRenderingTargetRenderer
Hierarchy
- FluidRenderingTargetRenderer
Index
Constructors
Properties
Accessors
- blur
Depth Depth Scale - blur
Depth Filter Size - blur
Depth Max Filter Size - blur
Depth Num Iterations - blur
Depth Size Divisor - blur
Thickness Filter Size - blur
Thickness Num Iterations - blur
Thickness Size Divisor - camera
- debug
- debug
Feature - depth
Map Size - diffuse
Map Size - enable
Blur Depth - enable
Blur Thickness - environment
Map - generate
Diffuse Texture - need
Initialization - samples
- thickness
Map Size - use
Fixed Thickness - use
Velocity
Methods
Constructors
constructor
Creates an instance of the class
Parameters
scene: Scene
Scene used to render the fluid object into
Optional camera: Camera
Camera used to render the fluid object. If not provided, use the active camera of the scene instead
Returns FluidRenderingTargetRenderer
Properties
densitySearch playground for density
Density of the fluid (positive number). The higher the value, the more opaque the fluid.
dir LightSearch playground for dirLight
Direction of the light. The fluid is assumed to be lit by a directional light
fluid ColorSearch playground for fluidColor
Fluid color. Not used if generateDiffuseTexture is true
fresnel ClampSearch playground for fresnelClamp
Strength of the fresnel effect (value between 0 and 1). Lower the value if you want to soften the specular effect
minimum ThicknessSearch playground for minimumThickness
Minimum thickness of the particles (positive number). If useFixedThickness is true, minimumThickness is the thickness used
refraction StrengthSearch playground for refractionStrength
Strength of the refraction (positive number, but generally between 0 and 0.3).
specular PowerSearch playground for specularPower
Strength of the specular power (positive number). Increase the value to make the specular effect more concentrated
Accessors
blur Depth Depth Scale
Depth weight in the calculation when applying the bilateral blur to generate the depth blur texture (positive number, generally between 0 and 100)
Returns number
Depth weight in the calculation when applying the bilateral blur to generate the depth blur texture (positive number, generally between 0 and 100)
Parameters
scale: number
Returns void
blur Depth Filter Size
Size of the kernel used to filter the depth blur texture (positive number, generally between 1 and 20 - higher values will require more processing power from the GPU)
Returns number
Size of the kernel used to filter the depth blur texture (positive number, generally between 1 and 20 - higher values will require more processing power from the GPU)
Parameters
filterSize: number
Returns void
blur Depth Max Filter Size
Maximum size of the kernel used to blur the depth texture (positive number, generally between 1 and 200 - higher values will require more processing power from the GPU when the particles are larger on screen)
Returns number
Maximum size of the kernel used to blur the depth texture (positive number, generally between 1 and 200 - higher values will require more processing power from the GPU when the particles are larger on screen)
Parameters
maxFilterSize: number
Returns void
blur Depth Num Iterations
Number of blurring iterations used to generate the depth blur texture (positive number, generally between 1 and 10 - higher values will require more processing power from the GPU)
Returns number
Number of blurring iterations used to generate the depth blur texture (positive number, generally between 1 and 10 - higher values will require more processing power from the GPU)
Parameters
numIterations: number
Returns void
blur Depth Size Divisor
Gets or sets the depth size divisor (positive number, generally between 1 and 4), which is used as a divisor when creating the texture used for blurring the depth For eg. if blurDepthSizeDivisor=2, the texture used to blur the depth will be half the size of the depth texture
Returns number
Gets or sets the depth size divisor (positive number, generally between 1 and 4), which is used as a divisor when creating the texture used for blurring the depth For eg. if blurDepthSizeDivisor=2, the texture used to blur the depth will be half the size of the depth texture
Parameters
scale: number
Returns void
blur Thickness Filter Size
Size of the kernel used to filter the thickness blur texture (positive number, generally between 1 and 20 - higher values will require more processing power from the GPU)
Returns number
Size of the kernel used to filter the thickness blur texture (positive number, generally between 1 and 20 - higher values will require more processing power from the GPU)
Parameters
filterSize: number
Returns void
blur Thickness Num Iterations
Number of blurring iterations used to generate the thickness blur texture (positive number, generally between 1 and 10 - higher values will require more processing power from the GPU)
Returns number
Number of blurring iterations used to generate the thickness blur texture (positive number, generally between 1 and 10 - higher values will require more processing power from the GPU)
Parameters
numIterations: number
Returns void
blur Thickness Size Divisor
Gets or sets the thickness size divisor (positive number, generally between 1 and 4), which is used as a divisor when creating the texture used for blurring the thickness For eg. if blurThicknessSizeDivisor=2, the texture used to blur the thickness will be half the size of the thickness texture
Returns number
Gets or sets the thickness size divisor (positive number, generally between 1 and 4), which is used as a divisor when creating the texture used for blurring the thickness For eg. if blurThicknessSizeDivisor=2, the texture used to blur the thickness will be half the size of the thickness texture
Parameters
scale: number
Returns void
camera
debug
Gets or sets a boolean indicating if we should display a specific texture (given by debugFeature) for debugging purpose
Returns boolean
Gets or sets a boolean indicating if we should display a specific texture (given by debugFeature) for debugging purpose
Parameters
debug: boolean
Returns void
debug Feature
Gets or sets the feature (texture) to be debugged. Not used if debug is false
Returns FluidRenderingDebug
Gets or sets the feature (texture) to be debugged. Not used if debug is false
Parameters
feature: FluidRenderingDebug
Returns void
depth Map Size
diffuse Map Size
enable Blur Depth
Gets or sets a boolean indicating that the depth texture should be blurred
Returns boolean
Gets or sets a boolean indicating that the depth texture should be blurred
Parameters
enable: boolean
Returns void
enable Blur Thickness
Gets or sets a boolean indicating that the thickness texture should be blurred
Returns boolean
Gets or sets a boolean indicating that the thickness texture should be blurred
Parameters
enable: boolean
Returns void
environment Map
Gets or sets the environment map used for the reflection part of the shading If null, no map will be used. If undefined, the scene.environmentMap will be used (if defined)
Returns undefined | Nullable<BaseTexture>
Gets or sets the environment map used for the reflection part of the shading If null, no map will be used. If undefined, the scene.environmentMap will be used (if defined)
Parameters
map: undefined | Nullable<BaseTexture>
Returns void
generate Diffuse Texture
Gets or sets a boolean indicating that the diffuse texture should be generated and used for the rendering
Returns boolean
Gets or sets a boolean indicating that the diffuse texture should be generated and used for the rendering
Parameters
generate: boolean
Returns void
need Initialization
Returns true if the class needs to be reinitialized (because of changes in parameterization)
Returns boolean
samples
Gets or sets the number of samples used by MSAA Note: changing this value in WebGL does not work because depth/stencil textures can't be created with MSAA (see https://github.com/BabylonJS/Babylon.js/issues/12444)
Returns number
Gets or sets the number of samples used by MSAA Note: changing this value in WebGL does not work because depth/stencil textures can't be created with MSAA (see https://github.com/BabylonJS/Babylon.js/issues/12444)
Parameters
samples: number
Returns void
thickness Map Size
use Fixed Thickness
Gets or sets a boolean indicating that a fixed thickness should be used instead of generating a thickness texture
Returns boolean
Gets or sets a boolean indicating that a fixed thickness should be used instead of generating a thickness texture
Parameters
use: boolean
Returns void
use Velocity
Gets or sets a boolean indicating that the velocity should be used when rendering the particles as a fluid. Note: the vertex buffers must contain a "velocity" buffer for this to work!
Returns boolean
Gets or sets a boolean indicating that the velocity should be used when rendering the particles as a fluid. Note: the vertex buffers must contain a "velocity" buffer for this to work!
Parameters
use: boolean
Returns void
Methods
disposeSearch playground for dispose
Releases all the ressources used by the class
Parameters
Optional onlyPostProcesses: boolean
If true, releases only the ressources used by the render post processes
Returns void
Class used to render an object as a fluid thanks to different render target textures (depth, thickness, diffuse)