Improve multi-bounce irradiance lighting by limiting the diffuse color intensity
This commit is contained in:
@@ -120,6 +120,7 @@ float4 PS_Lighting(AtlasVertexOutput input) : SV_Target
|
||||
|
||||
// Calculate lighting
|
||||
float3 diffuseColor = GetDiffuseColor(gBuffer);
|
||||
diffuseColor = min(diffuseColor, 0.9f); // Nothing reflects diffuse like perfectly in the real world (ensure to have energy loss at each light bounce)
|
||||
float3 diffuse = Diffuse_Lambert(diffuseColor);
|
||||
float4 light = float4(diffuse * irradiance, 1);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user