Class WaterMaterial
Hierarchy (View Summary)
- WebXRSpatialLayerType
- WaterMaterial
Constructors
constructor
-
new WaterMaterial(
name: string,
scene?: any,
renderTargetSize?: Vector2,
forceGLSL?: boolean,
): WaterMaterialParameters
- name: string
Optionalscene: any- renderTargetSize: Vector2 = ...
- forceGLSL: boolean = false
Use the GLSL code generation for the shader (even on WebGPU). Default is false
Returns WaterMaterial
Properties
bump Height
Defines the bump height related to the bump map.
color Blend Factor
Defines the blend factor related to the water color.
color Blend Factor2
Defines the blend factor related to the water color (reflection, far).
diffuse Color
disable Clip Plane
Sets or gets whether or not automatic clipping should be enabled or not. Setting to true will save performances and will avoid calculating useless pixels in the pixel shader of the water material.
render Target Size
specular Color
specular Power
water Color
Defines the water color blended with the refraction (near).
water Color2
Defines the water color blended with the reflection (far).
wave Count
Defines the number of times waves are repeated. This is typically used to adjust waves count according to the ground's size where the material is applied on.
wave Height
Defines the height of the waves.
wave Length
Defines the maximum length of a wave.
wave Speed
Defines the waves speed.
wind Direction
Defines the direction of the wind in the plane (X, Z).
wind Force
Defines the wind force.
Accessors
bump Affects Reflection
bump Superimpose
bump Texture
disable Lighting
fresnel Separate
has Render Target Textures
-
get hasRenderTargetTextures(): boolean
Gets a boolean indicating that current material needs to register RTT
Returns boolean
max Simultaneous Lights
reflection Texture
-
get reflectionTexture(): Nullable<RenderTargetTexture>
Returns Nullable<RenderTargetTexture>
refraction Texture
-
get refractionTexture(): Nullable<RenderTargetTexture>
Returns Nullable<RenderTargetTexture>
render Targets Enabled
-
get renderTargetsEnabled(): boolean
Returns boolean
use World Coordinates For Wave Deformation
Methods
add To Render List
-
Parameters
- node: any
Returns void
bind For Sub Mesh
-
Parameters
- world: Matrix
- mesh: Mesh
- subMesh: SubMesh
Returns void
clone
-
Parameters
- name: string
Returns WaterMaterial
dispose
-
Parameters
OptionalforceDisposeEffect: boolean
Returns void
enable Render Targets
-
Parameters
- enable: boolean
Returns void
get Active Textures
-
Returns BaseTexture[]
get Alpha Test Texture
-
Returns Nullable<BaseTexture>
get Animatables
-
Returns IAnimatable[]
get Class Name
-
Returns string
get Render List
-
Returns Nullable<AbstractMesh[]>
has Texture
-
Parameters
- texture: BaseTexture
Returns boolean
is Ready For Sub Mesh
-
Parameters
- mesh: AbstractMesh
- subMesh: SubMesh
OptionaluseInstances: boolean
Returns boolean
need Alpha Blending
-
Returns boolean
need Alpha Testing
-
Returns boolean
remove From Render List
-
Parameters
- node: any
Returns void
serialize
-
Returns any
StaticCreate Default Mesh
-
Parameters
- name: string
- scene: Scene
Returns Mesh
StaticParse
-
Parameters
- source: any
- scene: Scene
- rootUrl: string
Returns WaterMaterial
Constructor