@@ -1,5 +1,6 @@
#ifdef USE_AOMAP
+ // reads channel R, intended to be used with a combined OcclusionRoughnessMetallic (RGB) texture
float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
@@ -3,6 +3,8 @@ float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vUv );
- metalnessFactor *= texelMetalness.r;
+
+ // reads channel B, intended to be used with a combined OcclusionRoughnessMetallic (RGB) texture
+ metalnessFactor *= texelMetalness.b;
#endif
@@ -3,6 +3,8 @@ float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vUv );
- roughnessFactor *= texelRoughness.r;
+ // reads channel G, intended to be used with a combined OcclusionRoughnessMetallic (RGB) texture
+ roughnessFactor *= texelRoughness.g;