materialSpecularStrength
Provides the material's specular highlight strength, a value extracted specifically from the red (R) channel of the `.specularMap` texture.
Core Advantages
Its core advantage is conciseness and standardization: it encapsulates the common operation of 'sampling a texture and extracting a specific channel' into a single, named node, greatly simplifying the use of Specular-Glossiness PBR workflows and texture packing techniques.
Common Uses
Defining the specular strength of a surface in a PBR Specular-Glossiness workflow.
As a decoder to unpack specular strength data from a packed texture.
Directly outputting its value to debug the content of a `specularMap`'s red channel.
As a mix factor or driver to control other visual effects based on a texture's pattern.
How to adjust
Adjust by setting or replacing the `material.specularMap` texture in JavaScript. This node reads the red channel of the provided texture; the brighter the R channel's value, the higher the resulting specular strength.
Code Examples
1// Conceptually, this node is equivalent to the following operation:
2const specularStrength = texture( material.specularMap, uv() ).r;