UNPKG

three

Version:

JavaScript 3D library

13 lines (8 loc) 294 B
export default /* glsl */` float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture roughnessFactor *= texelRoughness.g; #endif `;