Răsfoiți Sursa

Merge pull request #7595 from WestLangley/dev-standard_envmap

MeshStandardMaterial: ignore indirect diffuse from envMaps for now
Mr.doob 9 ani în urmă
părinte
comite
534877d304
1 a modificat fișierele cu 12 adăugiri și 12 ștergeri
  1. 12 12
      src/renderers/shaders/ShaderChunk/lights_template.glsl

+ 12 - 12
src/renderers/shaders/ShaderChunk/lights_template.glsl

@@ -96,28 +96,28 @@ geometry.viewDir = normalize( vViewPosition );
 
 		vec3 indirectDiffuseIrradiance = getAmbientLightIrradiance( ambientLightColor );
 
-#ifdef USE_LIGHTMAP
+		#ifdef USE_LIGHTMAP
 
-		indirectDiffuseIrradiance += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage
+			indirectDiffuseIrradiance += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage
 
-#endif
+		#endif
 
-#if ( NUM_HEMI_LIGHTS > 0 )
+		#if ( NUM_HEMI_LIGHTS > 0 )
 
-		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
+			for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
 
-			indirectDiffuseIrradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
+				indirectDiffuseIrradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
 
-		}
+			}
 
-#endif
+		#endif
 
-#if defined( USE_ENVMAP ) && defined( STANDARD )
+		#if defined( USE_ENVMAP ) && defined( STANDARD )
 
-		// TODO, replace 8 with the real maxMIPLevel
-		indirectDiffuseIrradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, 8 );
+			// TODO, replace 8 with the real maxMIPLevel
+			//indirectDiffuseIrradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, 8 ); // comment out until seams are fixed
 
-#endif
+		#endif
 
 		Material_RE_IndirectDiffuseLight( indirectDiffuseIrradiance, geometry, material, reflectedLight );