Skip to content

Commit 2f332f5

Browse files
Fixed an issue where forced sky update would not update ambient probe. #6831
1 parent 355a935 commit 2f332f5

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2323
- Fixed errors spamming when in player mode due to ray tracing light cluster debug view (case 1390471).
2424
- Fixed missing unit in ray tracing related tooltips and docs (case 1397491).
2525
- Fixed artifacts on gpu light culling when the frustum near and far are very spread out (case 1386436)
26+
- Fixed an issue where forced sky update (like PBR sky amortized updated) would not update ambient probe.
2627

2728
## [12.1.4] - 2021-12-07
2829

com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,14 @@ public void UpdateEnvironment(HDCamera hdCamera,
884884
// Debug.Log("Update Sky Lighting");
885885
RenderSkyToCubemap(skyContext);
886886

887-
if (updateAmbientProbe && !renderingContext.computeAmbientProbeRequested)
887+
if (updateAmbientProbe)
888888
{
889889
using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.UpdateSkyAmbientProbe)))
890890
{
891891
cmd.SetComputeBufferParam(m_ComputeAmbientProbeCS, m_ComputeAmbientProbeKernel, m_AmbientProbeOutputBufferParam, renderingContext.ambientProbeResult);
892892
cmd.SetComputeTextureParam(m_ComputeAmbientProbeCS, m_ComputeAmbientProbeKernel, m_AmbientProbeInputCubemap, renderingContext.skyboxCubemapRT);
893893
cmd.DispatchCompute(m_ComputeAmbientProbeCS, m_ComputeAmbientProbeKernel, 1, 1, 1);
894894
cmd.RequestAsyncReadback(renderingContext.ambientProbeResult, renderingContext.OnComputeAmbientProbeDone);
895-
renderingContext.computeAmbientProbeRequested = true;
896895

897896
// When the profiler is enabled, we don't want to submit the render context because
898897
// it will break all the profiling sample Begin() calls issued previously, which leads

com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderingContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ internal class SkyRenderingContext
1515
public bool supportsConvolution { get; private set; } = false;
1616

1717
internal bool ambientProbeIsReady = false;
18-
public bool computeAmbientProbeRequested = false;
1918

2019
public SkyRenderingContext(int resolution, int bsdfCount, bool supportsConvolution, SphericalHarmonicsL2 ambientProbe, string name)
2120
{
@@ -44,7 +43,6 @@ public SkyRenderingContext(int resolution, int bsdfCount, bool supportsConvoluti
4443
public void Reset()
4544
{
4645
ambientProbeIsReady = false;
47-
computeAmbientProbeRequested = false;
4846
}
4947

5048
public void Cleanup()

0 commit comments

Comments
 (0)