提交 88c51fed 编写于 作者: M Mr.doob

Clean up.

上级 9e6b3e1f
......@@ -83,48 +83,40 @@ IncidentLight directLight;
#if defined( RE_IndirectDiffuse )
{
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
#ifdef USE_LIGHTMAP
#ifdef USE_LIGHTMAP
irradiance += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage
irradiance += 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 ++ ) {
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
irradiance += 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
// irradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, 8 ); // comment out until seams are fixed
// #endif
// TODO, replace 8 with the real maxMIPLevel
// irradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, 8 ); // comment out until seams are fixed
RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
// #endif
}
RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
{
// TODO, replace 8 with the real maxMIPLevel
vec3 radiance = getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, Material_BlinnShininessExponent( material ), 8 );
// TODO, replace 8 with the real maxMIPLevel
vec3 radiance = getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, Material_BlinnShininessExponent( material ), 8 );
RE_IndirectSpecular( radiance, geometry, material, reflectedLight );
}
RE_IndirectSpecular( radiance, geometry, material, reflectedLight );
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册