materialReflectivity
Provides access to the current material's `reflectivity` property, which is primarily used to control the intensity of environment reflections for non-metallic materials.
Core Advantages
Completely abstracts underlying Uniform management and seamlessly integrates with the standard material's `.reflectivity` property, allowing developers to easily control environment reflection intensity in a physically intuitive way.
Common Uses
Controlling the reflection intensity of an environment map (envMap).
As a factor for blending the Fresnel effect in custom PBR materials.
As a threshold or mask to switch between different rendering logics in non-photorealistic rendering (NPR).
Directly outputting its value as grayscale to debug the reflectivity settings of objects in a scene.
How to adjust
Adjust by modifying the `material.reflectivity` property (0-1) in JavaScript. At a value of 0, the object reflects almost no environment. As the value increases, the environment map's reflection becomes progressively clearer and more intense.
Code Examples
1// Multiply the color sampled from an environment map by the material's reflectivity
2const reflection = texture( envMap, reflectVec );
3const finalReflection = reflection.mul( materialReflectivity );