materialColor
Provides the material's base (diffuse) color, with built-in logic to multiply its `.color` property with its `.map` texture.
Core Advantages
Its core advantage is automatic combination: it encapsulates the common 'color multiplied by texture' operation while providing a `material.color` API consistent with standard materials, greatly simplifying the workflow.
Common Uses
As the final color output to display the material's base appearance.
As an input source for color mixing (e.g., with a Fresnel effect).
For visual debugging to quickly check base color or texture settings.
To drive other visual effects, such as determining emissive intensity based on its luminance.
How to adjust
Tint the material by modifying `material.color` (a `THREE.Color`) in JavaScript, or apply a texture by setting `material.map` (a `THREE.Texture`). If both are set, the final result is their multiplied effect.
Code Examples
1// Mix between the material's base color and a white highlight based on Fresnel
2const fresnelFactor = fresnel( normalView ).pow( 5 );
3const finalColor = mix( materialColor, vec3( 1 ), fresnelFactor );