Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/jsm/nodes/materials/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class NodeMaterial extends ShaderMaterial {

this.lightsNode = null;
this.envNode = null;
this.aoNode = null;

this.colorNode = null;
this.normalNode = null;
Expand Down Expand Up @@ -337,9 +338,11 @@ class NodeMaterial extends ShaderMaterial {

}

if ( builder.material.aoMap ) {
if ( this.aoNode !== null || builder.material.aoMap ) {

materialLightsNode.push( new AONode( texture( builder.material.aoMap ) ) );
const aoNode = this.aoNode !== null ? this.aoNode : texture( builder.material.aoMap );

materialLightsNode.push( new AONode( aoNode ) );

}

Expand Down