Skip to content

Commit 9473cb4

Browse files
szymonbonfirepastasfuture
authored andcommitted
one more fix for better dynamic GI bakes
1 parent f453803 commit 9473cb4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/ProbeVolume/DynamicGI/ProbeVolumeDynamicGI.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,16 @@ void DispatchPropagationHits(CommandBuffer cmd, ProbeVolumeHandle probeVolume, i
637637

638638
cmd.SetComputeFloatParam(shader, "_RangeBehindCamera", giSettings.rangeBehindCamera.value);
639639
cmd.SetComputeFloatParam(shader, "_RangeInFrontOfCamera", giSettings.rangeInFrontOfCamera.value);
640+
641+
#if UNITY_EDITOR
642+
if (ProbeVolume.preparingForBake)
643+
{
644+
cmd.SetComputeFloatParam(shader, "_RangeBehindCamera", float.MaxValue);
645+
cmd.SetComputeFloatParam(shader, "_RangeInFrontOfCamera", float.MaxValue);
646+
}
647+
#endif
640648
}
641-
649+
642650
cmd.SetComputeBufferParam(shader, kernel, "_PreviousRadianceCacheAxis", propagationPipelineData.GetReadRadianceCacheAxis());
643651
cmd.SetComputeIntParam(shader, "_RadianceCacheAxisCount", propagationPipelineData.radianceCacheAxis0.count);
644652
cmd.SetComputeBufferParam(shader, kernel, "_HitRadianceCacheAxis", propagationPipelineData.hitRadianceCache);

0 commit comments

Comments
 (0)