Newer
Older
HuangJiPC / public / static / three / src / renderers / shaders / ShaderChunk / roughnessmap_fragment.glsl.js
@zhangdeliang zhangdeliang on 21 Jun 282 bytes update
export default /* glsl */`
float roughnessFactor = roughness;

#ifdef USE_ROUGHNESSMAP

	vec4 texelRoughness = texture2D( roughnessMap, vUv );

	// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
	roughnessFactor *= texelRoughness.g;

#endif
`;