|
|
|
|
|
|
// First loop iteration |
|
|
|
if (featureFlags & (LIGHTFEATUREFLAGS_ENV | LIGHTFEATUREFLAGS_SKY | LIGHTFEATUREFLAGS_SSREFRACTION | LIGHTFEATUREFLAGS_SSREFLECTION)) |
|
|
|
{ |
|
|
|
float reflectionHierarchyWeight = 0.0; // Max: 1.0 |
|
|
|
float refractionHierarchyWeight = 0.0; // Max: 1.0 |
|
|
|
float reflectionHierarchyWeight = 0.0; // Max: 1.0 |
|
|
|
float refractionHierarchyWeight = 0.0; // Max: 1.0 |
|
|
|
#ifdef LIGHTLOOP_TILE_PASS |
|
|
|
GetCountAndStart(posInput, LIGHTCATEGORY_ENV, envLightStart, envLightCount); |
|
|
|
#else |
|
|
|
envLightCount = _EnvLightCount; |
|
|
|
#ifdef LIGHTLOOP_TILE_PASS |
|
|
|
GetCountAndStart(posInput, LIGHTCATEGORY_ENV, envLightStart, envLightCount); |
|
|
|
#else |
|
|
|
envLightCount = _EnvLightCount; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// Reflection / Refraction hierarchy is |
|
|
|
// 1. Screen Space Refraction / Reflection |
|
|
|
|
|
|
if (envLightCount > 0) |
|
|
|
{ |
|
|
|
if (envLightCount > 0) |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
envLightData = InitSkyEnvLightData(0); |
|
|
|
} |
|
|
|
else |
|
|
|
envLightData = InitSkyEnvLightData(0); |
|
|
|
|
|
|
|
if (featureFlags & LIGHTFEATUREFLAGS_SSREFLECTION) |
|
|
|
{ |
|
|
|
|
|
|
AccumulateIndirectLighting(lighting, aggregateLighting); |
|
|
|
} |
|
|
|
|
|
|
|
if (featureFlags & LIGHTFEATUREFLAGS_SSREFRACTION) |
|
|
|
if (featureFlags & LIGHTFEATUREFLAGS_SSREFRACTION) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Reflection probes are sorted by volume (in the increasing order). |
|
|
|
if (featureFlags & LIGHTFEATUREFLAGS_ENV) |
|
|
|