|
|
@@ -2,7 +2,6 @@ import { Material } from '../Material.js';
|
|
|
import { NormalBlending } from '../../constants.js';
|
|
|
|
|
|
import { getNodeChildren, getCacheKey } from '../../nodes/core/NodeUtils.js';
|
|
|
-import { attribute } from '../../nodes/core/AttributeNode.js';
|
|
|
import { output, diffuseColor, emissive, varyingProperty } from '../../nodes/core/PropertyNode.js';
|
|
|
import { materialAlphaTest, materialColor, materialOpacity, materialEmissive, materialNormal, materialLightMap, materialAO } from '../../nodes/accessors/MaterialNode.js';
|
|
|
import { modelViewProjection } from '../../nodes/accessors/ModelViewProjectionNode.js';
|
|
|
@@ -24,6 +23,7 @@ import { clipping, clippingAlpha, hardwareClipping } from '../../nodes/accessors
|
|
|
import NodeMaterialObserver from './manager/NodeMaterialObserver.js';
|
|
|
import getAlphaHashThreshold from '../../nodes/functions/material/getAlphaHashThreshold.js';
|
|
|
import { modelViewMatrix } from '../../nodes/accessors/ModelNode.js';
|
|
|
+import { vertexColor } from '../../nodes/accessors/VertexColorNode.js';
|
|
|
|
|
|
/**
|
|
|
* Base class for all node materials.
|
|
|
@@ -778,7 +778,7 @@ class NodeMaterial extends Material {
|
|
|
|
|
|
if ( this.vertexColors === true && geometry.hasAttribute( 'color' ) ) {
|
|
|
|
|
|
- colorNode = vec4( colorNode.xyz.mul( attribute( 'color', 'vec3' ) ), colorNode.a );
|
|
|
+ colorNode = colorNode.mul( vertexColor() );
|
|
|
|
|
|
}
|
|
|
|