Skip to content

Commit

Permalink
Revert "Diffuse color has already been calculated relative to the spe…
Browse files Browse the repository at this point in the history
…cular, so use that directly to fix dark fresnel for indirect specular lighting."

This reverts commit d657787.
  • Loading branch information
mrdoob committed May 28, 2019
1 parent 2d5351f commit 1128d60
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia
BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );
// The multiscattering paper uses the below formula for calculating diffuse
// for dielectrics, but this is already handled when initially computing the
// specular and diffuse color, so we can just use the diffuseColor directly.
//vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
vec3 diffuse = material.diffuseColor;
vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
reflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;
reflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;
Expand Down

0 comments on commit 1128d60

Please sign in to comment.