ior
Provides the material's Index of Refraction (IOR), a key physical parameter for creating realistic transparent or translucent materials like glass, water, and diamonds.
Core Advantages
Completely abstracts underlying Uniform management and seamlessly integrates with the `ior` property of physical materials, allowing developers to easily control refraction and reflection effects in a physically intuitive way.
Common Uses
Simulating transparent media like water (IOR ≈ 1.333) or glass (IOR ≈ 1.52).
Rendering high-IOR gemstones like diamonds (IOR ≈ 2.417) to produce sparkle.
Creating translucent plastic or acrylic materials.
As an input to the `fresnel` node for calculating physically accurate Fresnel reflections.
How to adjust
Modify the `material.ior` property (a number) in JavaScript. A value near 1.0 eliminates refraction; values from 1.3-1.7 produce natural effects like water or glass; higher values (e.g., 2.4) create dramatic, diamond-like distortion and sparkle.
Code Examples
1// Use ior as an input to the fresnel node to calculate reflectivity
2const F = fresnel( {
3 ior: ior,
4 normal: normalView
5} );