Skip to content

Commit

Permalink
custom shader stage build Node.buildStage()
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Feb 5, 2021
1 parent cfa90e0 commit eef49b1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/jsm/renderers/nodes/core/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,21 @@ class Node {

}

build( builder, output ) {
buildStage( builder, shaderStage, output = null ) {

const oldShaderStage = builder.shaderStage;

builder.shaderStage = shaderStage;

const snippet = this.build( builder, output );

builder.shaderStage = oldShaderStage;

return snippet;

}

build( builder, output = null ) {

builder.addNode( this );

Expand Down

0 comments on commit eef49b1

Please sign in to comment.