shininess
shininess
Provides access to the `shininess` property of a Phong material, controlling the size and sharpness of the specular highlight.
Core Advantages
Directly maps to the familiar `material.shininess` property, simplifying the workflow by avoiding manual uniform management for controlling highlights.
Common Uses
Defining the glossiness of Phong materials (e.g., polished plastic vs. matte rubber)
Creating shininess maps by combining with textures
Driving dynamic effects, such as a surface appearing wet
How to adjust
Adjust by setting the `material.shininess` number property in JS for a uniform value, or assign a TSL node graph to `material.shininessNode` for programmatic control (e.g., using a texture).
Code Examples
1// Read the material's shininess value and use it to drive another effect.
2// Here, we divide it by 100 to visualize it in the emissive channel.
3const shininessAsColor = shininess.div( 100 );
4
5material.emissiveNode = shininessAsColor;