Class PBRClearCoatConfiguration
Hierarchy
-
MaterialPluginBase
- PBRClearCoatConfiguration
Index
Constructors
Properties
Methods
Constructors
constructor
-
Parameters
-
material: PBRBaseMaterial
-
Optional addToPluginList: boolean
Returns PBRClearCoatConfiguration
-
Properties
bump TextureSearch playground for bumpTexture
Define the clear coat specific bump texture.
index OfRefractionSearch playground for indexOfRefraction
Defines the index of refraction of the clear coat. This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence The default fits with a polyurethane material. Changing the default value is more performance intensive.
intensitySearch playground for intensity
Defines the clear coat layer strength (between 0 and 1) it defaults to 1.
is EnabledSearch playground for isEnabled
Defines if the clear coat is enabled in the material.
is Tint EnabledSearch playground for isTintEnabled
Defines if the clear coat tint is enabled in the material.
nameSearch playground for name
Defines the name of the plugin
prioritySearch playground for priority
Defines the priority of the plugin. Lower numbers run first.
register For Extra EventsSearch playground for registerForExtraEvents
Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)
remap F0On Interface ChangeSearch playground for remapF0OnInterfaceChange
Defines if the F0 value should be remapped to account for the interface change in the material.
roughnessSearch playground for roughness
Defines the clear coat layer roughness.
textureSearch playground for texture
Stores the clear coat values in a texture (red channel is intensity and green channel is roughness) If useRoughnessFromMainTexture is false, the green channel of texture is not used and the green channel of textureRoughness is used instead if textureRoughness is not empty, else no texture roughness is used
texture RoughnessSearch playground for textureRoughness
Stores the clear coat roughness in a texture (green channel) Not used if useRoughnessFromMainTexture is true
tint ColorSearch playground for tintColor
Defines the clear coat tint of the material. This is only use if tint is enabled
tint Color AtDistanceSearch playground for tintColorAtDistance
Defines the distance at which the tint color should be found in the clear coat media. This is only use if tint is enabled
tint TextureSearch playground for tintTexture
Stores the clear tint values in a texture. rgb is tint a is a thickness factor
tint ThicknessSearch playground for tintThickness
Defines the clear coat layer thickness. This is only use if tint is enabled
use Roughness From Main TextureSearch playground for useRoughnessFromMainTexture
Indicates that the green channel of the texture property will be used for roughness (default: true) If false, the green channel from textureRoughness is used for roughness
Methods
add FallbacksSearch playground for addFallbacks
-
Parameters
-
defines: MaterialClearCoatDefines
-
fallbacks: EffectFallbacks
-
currentRank: number
Returns number
-
bind For Sub MeshSearch playground for bindForSubMesh
-
Parameters
-
uniformBuffer: UniformBuffer
-
scene: Scene
-
engine: Engine
-
subMesh: SubMesh
Returns void
-
collect DefinesSearch playground for collectDefines
-
Collects all defines.
Parameters
-
defines: {}
The object to append to.
-
[name: string]: { default: any; type: string }
-
default: any
-
type: string
-
-
Returns void
-
copy ToSearch playground for copyTo
-
Makes a duplicate of the current configuration into another one.
Parameters
-
plugin: MaterialPluginBase
define the config where to copy the info
Returns void
-
disposeSearch playground for dispose
-
Parameters
-
Optional forceDisposeTextures: boolean
Returns void
-
fill Render Target TexturesSearch playground for fillRenderTargetTextures
-
Fills the list of render target textures.
Parameters
-
renderTargets: SmartArray<RenderTargetTexture>
the list of render targets to update
Returns void
-
get Active TexturesSearch playground for getActiveTextures
-
Parameters
-
activeTextures: BaseTexture[]
Returns void
-
get AnimatablesSearch playground for getAnimatables
-
Parameters
-
animatables: IAnimatable[]
Returns void
-
get Class NameSearch playground for getClassName
-
Returns string
get Custom CodeSearch playground for getCustomCode
-
Returns a list of custom shader code fragments to customize the shader.
Parameters
-
shaderType: string
"vertex" or "fragment"
Returns Nullable<{}>
null if no code to be added, or a list of pointName => code. Note that
pointName
can also be a regular expression if it starts with a!
. In that case, the string found by the regular expression (if any) will be replaced by the code provided. -
get SamplersSearch playground for getSamplers
-
Parameters
-
samplers: string[]
Returns void
-
get UniformsSearch playground for getUniforms
-
Returns { fragment?: string; ubo?: Array<{ name: string; size: number; type: string }>; vertex?: string }
-
Optional fragment?: string
-
Optional ubo?: Array<{ name: string; size: number; type: string }>
-
Optional vertex?: string
-
hard Bind For Sub MeshSearch playground for hardBindForSubMesh
-
Binds the material data (this function is called even if mustRebind() returns false)
Parameters
-
uniformBuffer: UniformBuffer
defines the Uniform buffer to fill in.
-
scene: Scene
defines the scene the material belongs to.
-
engine: Engine
defines the engine the material belongs to.
-
subMesh: SubMesh
the submesh to bind data for
Returns void
-
has Render Target TexturesSearch playground for hasRenderTargetTextures
-
Gets a boolean indicating that current material needs to register RTT
Returns boolean
true if this uses a render target otherwise false.
has TextureSearch playground for hasTexture
-
Parameters
-
texture: BaseTexture
Returns boolean
-
is Ready For Sub MeshSearch playground for isReadyForSubMesh
parseSearch playground for parse
-
Parses a anisotropy Configuration from a serialized object.
Parameters
-
source: any
Serialized object.
-
scene: Scene
Defines the scene we are parsing for
-
rootUrl: string
Defines the rootUrl to load from
Returns void
-
prepare DefinesSearch playground for prepareDefines
-
Parameters
-
defines: MaterialClearCoatDefines
-
scene: Scene
-
mesh: AbstractMesh
Returns void
-
serializeSearch playground for serialize
-
Serializes this clear coat configuration.
Returns any
- An object with the serialized config.
Plugin that implements the clear coat component of the PBR material