Parcourir la source

physicallyCorrect -> physicallyCorrectLights.

Ben Houston il y a 9 ans
Parent
commit
c2ea1ff659

+ 1 - 1
examples/webgl_lights_physical.html

@@ -235,7 +235,7 @@
 
 
 				renderer = new THREE.WebGLRenderer();
-				renderer.physicallyCorrect = true;
+				renderer.physicallyCorrectLights = true;
 				renderer.gammaInput = true;
 				renderer.gammaOutput = true;
 				renderer.shadowMap.enabled = true;

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -57,7 +57,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	// physical lights
 
-	this.physicallyCorrect = false;
+	this.physicallyCorrectLights = false;
 
 	// tone mapping
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/ambient_pars.glsl

@@ -2,7 +2,7 @@ uniform vec3 ambientLightColor;
 
 vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 
-#if defined ( PHYSICALLY_CORRECT )
+#if defined ( PHYSICALLY_CORRECT_LIGHTS )
 
 	return ambientLightColor;
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/bsdfs.glsl

@@ -8,7 +8,7 @@ float punctualLightIntensityToIrradianceFactor( const in float lightDistance, co
 
 		if( decayExponent > 0.0 ) {
 
-#if defined ( PHYSICALLY_CORRECT )
+#if defined ( PHYSICALLY_CORRECT_LIGHTS )
 
 			// based upon Frostbite 3 Moving to Physically-based Rendering
 			// http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf

+ 1 - 1
src/renderers/shaders/ShaderChunk/lights_pars.glsl

@@ -140,7 +140,7 @@
 		float dotNL = dot( geometry.normal, hemiLight.direction );
 		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
 
-	#if defined( PHYSICALLY_CORRECT )
+	#if defined( PHYSICALLY_CORRECT_LIGHTS )
 
 		return mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl

@@ -26,7 +26,7 @@ void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in Geometri
 
 	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
 
-#if defined ( PHYSICALLY_CORRECT )
+#if defined ( PHYSICALLY_CORRECT_LIGHTS )
 
 	vec3 irradiance = dotNL * directLight.color;
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/lights_standard_pars_fragment.glsl

@@ -10,7 +10,7 @@ void RE_Direct_Standard( const in IncidentLight directLight, const in GeometricC
 
 	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
 
-#if defined ( PHYSICALLY_CORRECT )
+#if defined ( PHYSICALLY_CORRECT_LIGHTS )
 
 	vec3 irradiance = dotNL * directLight.color;
 

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

@@ -87,7 +87,7 @@ IncidentLight directLight;
 
 	#ifdef USE_LIGHTMAP
 
-		#if defined ( PHYSICALLY_CORRECT )
+		#if defined ( PHYSICALLY_CORRECT_LIGHTS )
 
 			irradiance += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
 

+ 1 - 1
src/renderers/webgl/WebGLProgram.js

@@ -518,7 +518,7 @@ THREE.WebGLProgram = ( function () {
 
 				parameters.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : '',
 
-				parameters.physicallyCorrect ? "#define PHYSICALLY_CORRECT" : '',
+				parameters.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : '',
 
 				parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
 				parameters.logarithmicDepthBuffer && renderer.extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',

+ 2 - 2
src/renderers/webgl/WebGLPrograms.js

@@ -23,7 +23,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
 		"maxBones", "useVertexTexture", "morphTargets", "morphNormals",
 		"maxMorphTargets", "maxMorphNormals", "premultipliedAlpha",
 		"numDirLights", "numPointLights", "numSpotLights", "numHemiLights",
-		"shadowMapEnabled", "pointLightShadows", "toneMapping", 'physicallyCorrect',
+		"shadowMapEnabled", "pointLightShadows", "toneMapping", 'physicallyCorrectLights',
 		"shadowMapType",
 		"alphaTest", "doubleSided", "flipSided"
 	];
@@ -176,7 +176,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
 			shadowMapType: renderer.shadowMap.type,
 
 			toneMapping: renderer.toneMapping,
-			physicallyCorrect: renderer.physicallyCorrect,
+			physicallyCorrectLights: renderer.physicallyCorrectLights,
 
 			premultipliedAlpha: ( material.blending === THREE.PremultipliedAlphaBlending ),
 			alphaTest: material.alphaTest,