Browse Source

Always use the correct normal map for clearcoat

Prior to this PR clearcoat used "normalMap" in case per-vertex tangents were enabled, and "clearcoatNormalMap" in case per-vertex tangents were disabled. Now we're correctly always using "clearcoatNormalMap".
Olli Etuaho 5 years ago
parent
commit
cedcd18e40

+ 1 - 1
src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.js

@@ -1,7 +1,7 @@
 export default /* glsl */`
 #ifdef USE_CLEARCOAT_NORMALMAP
 
-	vec3 clearcoatMapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
+	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
 	clearcoatMapN.xy *= clearcoatNormalScale;
 
 	#ifdef USE_TANGENT