Skip to content

Commit

Permalink
WebGPURenderer: Apply setupDepth even if fragmentNode isn't null (#28043
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RenaudRohlinger authored Apr 1, 2024
1 parent aaafb4f commit 9b5d697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/nodes/materials/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ class NodeMaterial extends ShaderMaterial {

const clippingNode = this.setupClipping( builder );

if ( this.fragmentNode === null ) {
if ( this.depthWrite === true ) this.setupDepth( builder );

if ( this.depthWrite === true ) this.setupDepth( builder );
if ( this.fragmentNode === null ) {

if ( this.normals === true ) this.setupNormal( builder );

Expand Down

0 comments on commit 9b5d697

Please sign in to comment.