materialIridescenceIOR
Provides the Index of Refraction (IOR) for the thin-film layer in an iridescence effect, a key physical parameter that affects its reflective intensity and color response.
Core Advantages
Decouples the physical properties of the iridescence (the film's IOR) from its strength and the base material, allowing developers to precisely control multi-layered optical effects in a physically-based way to enhance realism.
Common Uses
Accurately simulating the physical iridescence of specific coatings or oil films.
Differentiating the IOR of a substrate (e.g., water) from that of a thin film (e.g., oil) for realistic layered effects.
As an artistic tool to fine-tune the reflectivity and contrast of the iridescence by changing its IOR.
How to adjust
Modify the `material.iridescenceIOR` property in JavaScript (a number, defaults to 1.3). It doesn't directly change the color sequence but affects its reflective intensity. A higher value leads to a more pronounced, high-contrast, 'metallic' effect; a lower value results in a softer effect.
Code Examples
1// Conceptually, materialIridescenceIOR is a key input to the internal iridescence function
2const iridescenceColor = iridescenceCalculation(
3 normal,
4 view,
5 materialIridescenceIOR, // <-- Used here
6 materialIridescenceThickness
7);