Add Global Illumination sampling option to transparent materials (eg. particles)

This commit is contained in:
2022-07-14 14:28:42 +02:00
parent 4cc7bb96f5
commit 0d8ebd332e
10 changed files with 113 additions and 2 deletions
@@ -97,6 +97,11 @@ float4 PS_Forward(PixelInput input) : SV_Target0
light += GetLighting(ViewPos, localLight, gBuffer, shadowMask, true, isSpotLight);
}
// Calculate lighting from Global Illumination
#if USE_GI
light += GetGlobalIlluminationLighting(gBuffer);
#endif
// Calculate reflections
#if USE_REFLECTIONS
float3 reflections = SampleReflectionProbe(ViewPos, EnvProbe, EnvironmentProbe, gBuffer.WorldPos, gBuffer.Normal, gBuffer.Roughness).rgb;