materialIridescence
Provides the material's iridescence strength, a 0-1 float value that controls the view-dependent color effect caused by thin-film interference.
Core Advantages
Its core advantage is completely encapsulating the complex physics of thin-film interference, seamlessly integrating with the `material.iridescence` property and allowing developers to control an advanced optical effect with a simple on/off switch and intensity slider.
Common Uses
Simulating soap bubbles or oil slicks on water.
Creating pearlescent or chameleon car paints.
Replicating the structural color of insects or bird feathers.
Adding dynamic sheen to sci-fi energy shields or magical items.
How to adjust
Modify the `material.iridescence` property (0-1) in JavaScript. A value of 0 has no effect. At 1, the effect is strongest, overlaying a vibrant, view-dependent colored film on specular highlights. For a complete effect, `iridescenceIOR` and `iridescenceThicknessRange` must also be configured.
Code Examples
1// Conceptually, materialIridescence acts as an intensity mix factor for the final effect
2const iridescenceColor = iridescenceCalculation( normal, view, ior, thickness ); // Complex iridescence color calculation
3const finalSpecular = mix( baseSpecular, iridescenceColor, materialIridescence );