提交 f3bfd1af 编写于 作者: W WestLangley

Decouple light probe irradiance from other indirect light sources

上级 9769ae46
...@@ -7,7 +7,7 @@ export default /* glsl */` ...@@ -7,7 +7,7 @@ export default /* glsl */`
#if defined( RE_IndirectSpecular ) #if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, irradiance, clearcoatRadiance, geometry, material, reflectedLight ); RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif #endif
`; `;
...@@ -15,9 +15,11 @@ export default /* glsl */` ...@@ -15,9 +15,11 @@ export default /* glsl */`
#endif #endif
vec3 iblIrradiance = vec3( 0.0 );
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
irradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, maxMipLevel ); iblIrradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, maxMipLevel );
#endif #endif
......
...@@ -117,6 +117,7 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC ...@@ -117,6 +117,7 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册