Skip to content

Commit 9d4dd25

Browse files
authored
Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218). (#6600)
1 parent 87fb357 commit 9d4dd25

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7474
- Fixed compilation issue related to shader stripping in ray tracing.
7575
- Fixed flipped UV for directional light cookie on PBR Sky (case 1382656).
7676
- Fixing missing doc API for RTAS Debug display.
77+
- Fixed AO dissapearing when DRS would be turned off through a camera, while hardware drs is active in DX12 or Vulkan (case 1383093).
78+
- Fixed misc shader warnings.
79+
- Fixed a shader warning in UnityInstancing.hlsl
80+
- Fixed for APV debug mode breaking rendering when switching to an asset with APV disabled.
81+
- Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218).
7782
- Fixed the fade in mode of the clouds not impacting the volumetric clouds shadows (case 1381652).
7883

7984
### Changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricClouds.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public partial class HDRenderPipeline
3131
int m_CombineCloudsKernelColorCopy;
3232
int m_CombineCloudsKernelColorRW;
3333
int m_CombineCloudsSkyKernel;
34+
bool m_ActiveVolumetricClouds;
3435

3536
// Combine pass via hardware blending, used in case of MSAA color target.
3637
Material m_CloudCombinePass;
@@ -52,7 +53,9 @@ struct VolumetricCloudsCameraData
5253

5354
void InitializeVolumetricClouds()
5455
{
55-
if (!m_Asset.currentPlatformRenderPipelineSettings.supportVolumetricClouds)
56+
// Keep track of the state for the release
57+
m_ActiveVolumetricClouds = m_Asset.currentPlatformRenderPipelineSettings.supportVolumetricClouds;
58+
if (!m_ActiveVolumetricClouds)
5659
return;
5760

5861
// Allocate the buffers for ambient probe evaluation
@@ -89,7 +92,7 @@ void InitializeVolumetricClouds()
8992

9093
void ReleaseVolumetricClouds()
9194
{
92-
if (!m_Asset.currentPlatformRenderPipelineSettings.supportVolumetricClouds)
95+
if (!m_ActiveVolumetricClouds)
9396
return;
9497

9598
// Destroy the material

0 commit comments

Comments
 (0)