Class ShadowOnlyMaterial
Hierarchy (View Summary)
- WebXRSpatialLayerType
- ShadowOnlyMaterial
Constructors
constructor
-
Instantiates a ShadowOnly Material in the given scene
Parameters
- name: string
The friendly name of the material
Optionalscene: anyThe scene to add the material to
- forceGLSL: boolean = false
Use the GLSL code generation for the shader (even on WebGPU). Default is false
Returns ShadowOnlyMaterial
- name: string
Properties
shadow Color
shadowColor: any = ...
The color the shadow is rendered with (black by default). Only its RGB is used; shadow strength is written to the material's alpha channel.
Accessors
active Light
-
get activeLight(): IShadowLight
Returns IShadowLight
-
set activeLight(light: IShadowLight): void
Parameters
- light: IShadowLight
Returns void
Methods
bind For Sub Mesh
-
Parameters
- world: Matrix
- mesh: Mesh
- subMesh: SubMesh
Returns void
clone
-
Parameters
- name: string
Returns ShadowOnlyMaterial
get Alpha Test Texture
-
Returns Nullable<BaseTexture>
get Class Name
-
Returns string
is Ready For Sub Mesh
-
Parameters
- mesh: AbstractMesh
- subMesh: SubMesh
OptionaluseInstances: boolean
Returns boolean
need Alpha Blending
-
Returns boolean
need Alpha Testing
-
Returns boolean
serialize
-
Returns any
StaticParse
-
Creates a ShadowOnly material from parsed material data.
Parameters
- source: any
defines the JSON representation of the material
- scene: Scene
defines the hosting scene
- rootUrl: string
defines the root URL to use to load textures and relative dependencies
Returns ShadowOnlyMaterial
a new ShadowOnly material
- source: any
A transparent "shadow catcher" material: it renders only shadow strength into its alpha channel (over shadowColor, black by default), so shadows can be composited over an arbitrary background.
It can receive IBL shadows (via
IblShadowsRenderPipeline.addShadowReceivingMaterial/ the Frame Graph IBL shadows task). Because the material has a single alpha output channel, IBL shadows are received as monochrome: a colored IBL shadow is reduced to its luminance rather than preserving per-channel hue.