浏览代码

more readable - ndef STANDARD to def PHYSICAL

sunag 6 年之前
父节点
当前提交
b244ee366d

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

@@ -27,7 +27,7 @@ export default /* glsl */`
 
 
 	radiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.normal, Material_BlinnShininessExponent( material ), maxMipLevel );
 	radiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.normal, Material_BlinnShininessExponent( material ), maxMipLevel );
 
 
-	#ifndef STANDARD
+	#ifdef PHYSICAL
 
 
 		clearCoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearCoatNormal, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );
 		clearCoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearCoatNormal, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );
 
 

+ 3 - 3
src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js

@@ -5,7 +5,7 @@ struct PhysicalMaterial {
 	float	specularRoughness;
 	float	specularRoughness;
 	vec3	specularColor;
 	vec3	specularColor;
 
 
-	#ifndef STANDARD
+	#ifdef PHYSICAL
 		float clearCoat;
 		float clearCoat;
 		float clearCoatRoughness;
 		float clearCoatRoughness;
 	#endif
 	#endif
@@ -76,7 +76,7 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
 
 
 	#endif
 	#endif
 
 
-	#ifndef STANDARD
+	#ifdef PHYSICAL
 
 
 		float ccDotNL = saturate( dot( geometry.clearCoatNormal, directLight.direction ) );
 		float ccDotNL = saturate( dot( geometry.clearCoatNormal, directLight.direction ) );
 
 
@@ -111,7 +111,7 @@ void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricCo
 
 
 void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
 void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
 
 
-	#ifndef STANDARD
+	#ifdef PHYSICAL
 
 
 		float ccDotNV = saturate( dot( geometry.clearCoatNormal, geometry.viewDir ) );
 		float ccDotNV = saturate( dot( geometry.clearCoatNormal, geometry.viewDir ) );
 
 

+ 1 - 1
src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js

@@ -7,7 +7,7 @@ uniform float roughness;
 uniform float metalness;
 uniform float metalness;
 uniform float opacity;
 uniform float opacity;
 
 
-#ifndef STANDARD
+#ifdef PHYSICAL
 	uniform float clearCoat;
 	uniform float clearCoat;
 	uniform float clearCoatRoughness;
 	uniform float clearCoatRoughness;
 #endif
 #endif