Skip to content

Commit 6b28459

Browse files
authored
ShadowMaskModel: Fix signatures. (#30764)
* ShadowMaskModel: Fix signatures. * ShadowMaskModel: Use `mulAssign()`. * ShadowNodeMaterial: Fix transparent.
1 parent a3d3041 commit 6b28459

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/materials/nodes/ShadowNodeMaterial.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ class ShadowNodeMaterial extends NodeMaterial {
4545
*/
4646
this.lights = true;
4747

48+
/**
49+
* Overwritten since shadow materials are transparent
50+
* by default.
51+
*
52+
* @type {boolean}
53+
* @default true
54+
*/
55+
this.transparent = true;
56+
4857
this.setDefaultValues( _defaultValues );
4958

5059
this.setValues( parameters );

src/nodes/functions/ShadowMaskModel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ class ShadowMaskModel extends LightingModel {
3030
*
3131
* @param {Object} input - The input data.
3232
*/
33-
direct( { shadowMask } ) {
33+
direct( { lightNode } ) {
3434

35-
this.shadowNode.mulAssign( shadowMask );
35+
this.shadowNode.mulAssign( lightNode.shadowNode );
3636

3737
}
3838

3939
/**
4040
* Uses the shadow mask to produce the final color.
4141
*
42-
* @param {ContextNode} context - The current node context.
42+
* @param {NodeBuilder} builder - The current node builder.
4343
*/
44-
finish( context ) {
44+
finish( { context } ) {
4545

4646
diffuseColor.a.mulAssign( this.shadowNode.oneMinus() );
4747

0 commit comments

Comments
 (0)