Skip to content

Commit

Permalink
add support for meshPhongNodeMaterial (#26224)
Browse files Browse the repository at this point in the history
Co-authored-by: aardgoose <angus.sawyer@email.com>
  • Loading branch information
aardgoose and aardgoose authored Jun 9, 2023
1 parent 7bed7fb commit 8d2430f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const nodeShaderLib = {
MeshBasicNodeMaterial: ShaderLib.basic,
PointsNodeMaterial: ShaderLib.points,
MeshStandardNodeMaterial: ShaderLib.standard,
MeshPhysicalNodeMaterial: ShaderLib.physical
MeshPhysicalNodeMaterial: ShaderLib.physical,
MeshPhongNodeMaterial: ShaderLib.phong
};

const glslMethods = {
Expand Down Expand Up @@ -74,6 +75,7 @@ class WebGLNodeBuilder extends NodeBuilder {

if ( material.isMeshPhysicalNodeMaterial ) type = 'MeshPhysicalNodeMaterial';
else if ( material.isMeshStandardNodeMaterial ) type = 'MeshStandardNodeMaterial';
else if ( material.isMeshPhongNodeMaterial ) type = 'MeshPhongNodeMaterial';
else if ( material.isMeshBasicNodeMaterial ) type = 'MeshBasicNodeMaterial';
else if ( material.isPointsNodeMaterial ) type = 'PointsNodeMaterial';
else if ( material.isLineBasicNodeMaterial ) type = 'LineBasicNodeMaterial';
Expand Down

0 comments on commit 8d2430f

Please sign in to comment.