File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -588,11 +588,30 @@ class MaterialXNode {
588588
589589 //
590590
591+ let normalNode = null ;
592+
593+ if ( inputs . normal ) normalNode = inputs . normal ;
594+
595+ //
596+
597+ let emissiveNode = null ;
598+
599+ if ( inputs . emission ) emissiveNode = inputs . emission ;
600+ if ( inputs . emissionColor ) {
601+
602+ emissiveNode = emissiveNode ? mul ( emissiveNode , inputs . emissionColor ) : emissiveNode ;
603+
604+ }
605+
606+ //
607+
591608 material . colorNode = colorNode || color ( 0.8 , 0.8 , 0.8 ) ;
592609 material . roughnessNode = roughnessNode || float ( 0.2 ) ;
593610 material . metalnessNode = metalnessNode || float ( 0 ) ;
594611 material . clearcoatNode = clearcoatNode || float ( 0 ) ;
595612 material . clearcoatRoughnessNode = clearcoatRoughnessNode || float ( 0 ) ;
613+ if ( normalNode ) material . normalNode = normalNode ;
614+ if ( emissiveNode ) material . emissiveNode = emissiveNode ;
596615
597616 }
598617
You can’t perform that action at this time.
0 commit comments