Add improved Global Surface Atlas lighting at far cascades and cascade borders
This commit is contained in:
@@ -46,8 +46,7 @@ GPU_CB_STRUCT(Data0 {
|
||||
GlobalSignDistanceFieldPass::ConstantsData GlobalSDF;
|
||||
GlobalSurfaceAtlasPass::ConstantsData GlobalSurfaceAtlas;
|
||||
ShaderGBufferData GBuffer;
|
||||
float Padding0;
|
||||
float ProbesDistanceLimit;
|
||||
Float2 Padding0;
|
||||
float ResetBlend;
|
||||
float TemporalTime;
|
||||
Int4 ProbeScrollClears[4];
|
||||
@@ -471,7 +470,6 @@ bool DynamicDiffuseGlobalIlluminationPass::RenderInner(RenderContext& renderCont
|
||||
data.DDGI = ddgiData.Result.Constants;
|
||||
data.GlobalSDF = bindingDataSDF.Constants;
|
||||
data.GlobalSurfaceAtlas = bindingDataSurfaceAtlas.Constants;
|
||||
data.ProbesDistanceLimit = 1.05f; // TODO: expose to be configurable?
|
||||
data.ResetBlend = clear ? 1.0f : 0.0f;
|
||||
for (int32 cascadeIndex = 0; cascadeIndex < cascadesCount; cascadeIndex++)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,7 @@ DDGIData DDGI;
|
||||
GlobalSDFData GlobalSDF;
|
||||
GlobalSurfaceAtlasData GlobalSurfaceAtlas;
|
||||
GBufferData GBuffer;
|
||||
float Padding0;
|
||||
float ProbesDistanceLimit;
|
||||
float2 Padding0;
|
||||
float ResetBlend;
|
||||
float TemporalTime;
|
||||
int4 ProbeScrollClears[4];
|
||||
@@ -101,6 +100,7 @@ void CS_Classify(uint3 DispatchThreadId : SV_DispatchThreadID)
|
||||
float prevProbesSpacing = DDGI.ProbesOriginAndSpacing[prevCascade].w;
|
||||
float3 prevProbesOrigin = DDGI.ProbesScrollOffsets[prevCascade].xyz * prevProbesSpacing + DDGI.ProbesOriginAndSpacing[prevCascade].xyz;
|
||||
float3 prevProbesExtent = (DDGI.ProbesCounts - 1) * (prevProbesSpacing * 0.5f);
|
||||
prevProbesExtent -= probesSpacing; // Apply safe margin to allow probes on cascade edges
|
||||
float prevCascadeWeight = Min3(prevProbesExtent - abs(probeBasePosition - prevProbesOrigin));
|
||||
if (prevCascadeWeight > 0.1f)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user