Get rid of ddgi probe distance scaling
This commit is contained in:
@@ -238,7 +238,7 @@ float3 SampleDDGIIrradianceCascade(DDGIData data, Texture2D<snorm float4> probes
|
||||
// Sample distance texture
|
||||
float2 octahedralCoords = GetOctahedralCoords(-biasedPosToProbe);
|
||||
float2 uv = GetDDGIProbeUV(data, cascadeIndex, probeIndex, octahedralCoords, DDGI_PROBE_RESOLUTION_DISTANCE);
|
||||
float2 probeDistance = probesDistance.SampleLevel(SamplerLinearClamp, uv, 0).rg * 2.0f;
|
||||
float2 probeDistance = probesDistance.SampleLevel(SamplerLinearClamp, uv, 0).rg;
|
||||
|
||||
// Visibility weight (Chebyshev)
|
||||
if (biasedPosToProbeDist > probeDistance.x && useVisibility)
|
||||
|
||||
@@ -807,7 +807,11 @@ void CS_UpdateProbes(uint3 GroupThreadId : SV_GroupThreadID, uint3 GroupId : SV_
|
||||
|
||||
// Normalize results
|
||||
float epsilon = (float)probeRaysCount * 1e-9f;
|
||||
#if DDGI_PROBE_UPDATE_MODE == DDGI_PROBE_UPDATE_IRRADIANCE
|
||||
result.rgb *= 1.0f / (2.0f * max(result.a, epsilon));
|
||||
#else
|
||||
result.rgb *= 1.0f / max(result.a, epsilon);
|
||||
#endif
|
||||
|
||||
// Load current probe value
|
||||
uint2 outputCoords = GetDDGIProbeTexelCoords(DDGI, CascadeIndex, probeIndex) * (DDGI_PROBE_RESOLUTION + 2) + 1 + GroupThreadId.xy;
|
||||
|
||||
Reference in New Issue
Block a user