Add missing AO for DDGI irradiance

This commit is contained in:
Wojciech Figat
2022-06-09 10:55:26 +02:00
parent 6a74ebd62e
commit 211491f3d2
2 changed files with 2 additions and 2 deletions

View File

@@ -465,7 +465,7 @@ void PS_IndirectLighting(Quad_VS2PS input, out float4 output : SV_Target0)
// Calculate lighting
float3 diffuseColor = GetDiffuseColor(gBuffer);
float3 diffuse = Diffuse_Lambert(diffuseColor);
output = float4(diffuse * irradiance, 1);
output = float4(diffuse * irradiance * gBuffer.AO, 1);
}
#endif

View File

@@ -126,7 +126,7 @@ float4 PS_Lighting(AtlasVertexOutput input) : SV_Target
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);
float4 light = float4(diffuse * irradiance * gBuffer.AO, 1);
#else
// Calculate shadowing
float3 L = Light.Direction;