Reproduction steps:
1. Open the attached “BugRepro” project
2. Observe the Console window
Expected results: No errors are thrown
Actual results: DivideByZeroExceptions are thrown consistently
Reproduced with: 2021.3.39f1
Not reproduced with: 2022.3.33f1, 6000.0.5f1
Reproduced on: Ubuntu 24.04, Windows 10 Pro
Notes: still reproducible after upgrading to 2022.3.33f1 and then downgrading to 2021.3.39f1
Full error:
DivideByZeroException: Attempted to divide by zero.
at UnityEngine.Rendering.HighDefinition.Texture3DAtlas.GetMaxElementCountForWeightInByte (System.Int64 weight, System.Int32 elementSize, System.Int32 elementCount, UnityEngine.Experimental.Rendering.GraphicsFormat format, System.Boolean hasMipMaps) [0x00024] in /media/daugardas/Editors/projects/IN-77503_IN_77248_2022.3.28f1/Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.15/Runtime/RenderPipeline/Utility/Texture3DAtlas.cs:546
at UnityEngine.Rendering.HighDefinition.LocalVolumetricFogManager.get_volumeAtlas () [0x00025] in /media/daugardas/Editors/projects/IN-77503_IN_77248_2022.3.28f1/Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.15/Runtime/Lighting/VolumetricLighting/LocalVolumetricFogManager.cs:31