fireball/lib/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl

11 lines
252 B
Plaintext
Raw Normal View History

2018-12-25 13:59:22 +00:00
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