materialIOR
Provides the material's Index of Refraction (IOR), a core physical parameter that determines the reflectivity of non-metals (Fresnel effect) and the distortion of transparent materials.
Core Advantages
Standardizes the core physical property of IOR and seamlessly integrates it with the `material.ior` property, allowing developers to create a wide range of realistic dielectric materials, from plastic to diamond, in a physically intuitive way.
Common Uses
Rendering the refractive effects of transparent materials like water (IOR≈1.33) or glass (IOR≈1.5).
Defining the reflective qualities of opaque non-metals like plastic and ceramic.
Simulating the brilliant appearance of high-IOR gemstones like diamonds (IOR≈2.42).
As an input to the `fresnel` node to calculate physically accurate reflectivity.
How to adjust
Modify the `material.ior` property (a number) in JavaScript. A value of 1.0 makes the object nearly invisible; the 1.3-1.5 range produces natural effects like water or glass; and higher values (e.g., 2.4) create the intense reflection and distortion of a diamond.
Code Examples
1// Use materialIOR to calculate the Fresnel factor, which determines reflectivity
2const F = fresnel( {
3 ior: materialIOR,
4 normal: normalView
5} );