web3d / node_modules /three /src /renderers /shaders /ShaderChunk /metalnessmap_fragment.glsl.js
julien-c's picture
julien-c HF Staff
do not gitignore the builds
6cd9596
raw
history blame
282 Bytes
export default /* glsl */`
float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vUv );
// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
metalnessFactor *= texelMetalness.b;
#endif
`;