Skip to content

Commit df7ab65

Browse files
Fixed a problem where the sky reflection probe would be garbage after a domain reload.
1 parent 9d6c673 commit df7ab65

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky

Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ void RebuildTextures(SkySettings skySettings)
168168
Utilities.Destroy(m_SkyboxMarginalRowCdfRT);
169169
Utilities.Destroy(m_SkyboxConditionalCdfRT);
170170

171-
m_UpdateRequired = true; // Special case. Even if update mode is set to OnDemand, we need to regenerate the environment after destroying the texture.
171+
m_SkyboxCubemapRT = null;
172+
m_SkyboxGGXCubemapRT = null;
173+
m_SkyboxMarginalRowCdfRT = null;
174+
m_SkyboxConditionalCdfRT = null;
172175
}
173176

174177
if (m_SkyboxCubemapRT == null)
@@ -208,6 +211,8 @@ void RebuildTextures(SkySettings skySettings)
208211
m_SkyboxConditionalCdfRT.filterMode = FilterMode.Point;
209212
m_SkyboxConditionalCdfRT.Create();
210213
}
214+
215+
m_UpdateRequired = true; // Special case. Even if update mode is set to OnDemand, we need to regenerate the environment after destroying the texture.
211216
}
212217

213218
m_CubemapScreenSize = new Vector4((float)resolution, (float)resolution, 1.0f / (float)resolution, 1.0f / (float)resolution);

0 commit comments

Comments
 (0)