|
|
|
|
|
|
uint envLightIndex = i; |
|
|
|
#endif |
|
|
|
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, _EnvLightDatas[envLightIndex], bsdfData, _EnvLightDatas[envLightIndex].envShapeType, |
|
|
|
GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, reflectionHierarchyWeight); |
|
|
|
GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, refractionHierarchyWeight); |
|
|
|
AccumulateIndirectLighting(lighting, aggregateLighting); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
// The sky is a single cubemap texture separate from the reflection probe texture array (different resolution and compression) |
|
|
|
context.sampleReflection = SINGLE_PASS_CONTEXT_SAMPLE_SKY; |
|
|
|
EnvLightData envLightSky = InitSkyEnvLightData(0); // The sky data are generated on the fly so the compiler can optimize the code |
|
|
|
IndirectLighting lighting = EvaluateBSDF_Env(context, V, posInput, preLightData, envLightSky, bsdfData, ENVSHAPETYPE_SKY, GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, reflectionHierarchyWeight); |
|
|
|
IndirectLighting lighting = EvaluateBSDF_Env(context, V, posInput, preLightData, envLightSky, bsdfData, ENVSHAPETYPE_SKY, GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, refractionHierarchyWeight); |
|
|
|
AccumulateIndirectLighting(lighting, aggregateLighting); |
|
|
|
} |
|
|
|
} |
|
|
|