Skip to content

Commit f2d6139

Browse files
authored
Merge pull request #16492 from Mugen87/dev32
TS: Added customDepthMaterial and customDistanceMaterial to Object3D.
2 parents cacdf89 + bbad182 commit f2d6139

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/core/Object3D.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,19 @@ export class Object3D extends EventDispatcher {
130130
*/
131131
userData: { [key: string]: any };
132132

133+
/**
134+
* Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes.
135+
* When shadow-casting with a DirectionalLight or SpotLight, if you are (a) modifying vertex positions in
136+
* the vertex shader, (b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a
137+
* transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.
138+
*/
139+
customDepthMaterial: Material;
140+
141+
/**
142+
* Same as customDepthMaterial, but used with PointLight.
143+
*/
144+
customDistanceMaterial: Material;
145+
133146
/**
134147
* Used to check whether this or derived classes are Object3Ds. Default is true.
135148
* You should not change this, as it is used internally for optimisation.

0 commit comments

Comments
 (0)