Search Issue Tracker
By Design
By Design in 6000.1.X
Votes
0
Found in
2021.3.46f1
2022.3.54f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-90481
Regression
No
Volumetrics break when using a Custom Pass to create a Thickness Buffer for Alpha Clipping
Reproduction steps:
1. Open the attached “Pressure.zip” project
2. Open the “OutdoorsScene”
3. Observe the Game view
4. Move the “Main Camera” inside the boundaries of the “Capsule” GameObject (around (-2;-1;9))
5. Observe the Game view
Expected result: The Volumetric Fog effect is visible in the Game view, like in 3rd step
Actual result: The Volumetric Fog effect is not visible in the Game view
Reproducible with: 2021.3.46f1, 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: Windows 11
Not reproducible on: no other environment tested
Note:
- Reproduces when ‘Injection Point’ is ‘Before Rendering’ or ‘After Opaque Depth And Normal’
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Your "WaterSurface" shadergraph is screen-space sampling your _ExcluderDepthNear and _ExcluderDepthFar for all shader passes (opaque, depth, shadow-caster, etc.), which is causing non-camera-aligned passes to discard pixels incorrectly.
In your case, the "ShadowCaster" pass is sampling these camera-aligned textures and discarding shadow-map pixels incorrectly in `_ShadowmapCascadeAtlas` (used to later compute volumetric lighting), leading to its corruption and rendering artifacts (position the camera inside the capsule, open the `FrameDebugger` and observe the contents of your shadowmap at the end of the `RenderShadowMaps` section).
You have two possible workarounds here:
- If you're ok with the clipped-area not affecting the shadows/god-rays, you can add a custom HLSL block to your shadergraph, where you disable this near/far test when `SHADERPASS == SHADERPASS_SHADOWS`.
- If you want to affect the shadows/god-rays, you need near/far textures per-view (each camera, shadow-casting light, etc.) and sample the correct one based on which view you're rendering. This will increase the effect complexity significantly, but it's the only way to represent that volume-cutout correctly for all passes.
Resolution Note (6000.1.X):
Your "WaterSurface" shadergraph is screen-space sampling your _ExcluderDepthNear and _ExcluderDepthFar for all shader passes (opaque, depth, shadow-caster, etc.), which is causing non-camera-aligned passes to discard pixels incorrectly.
In your case, the "ShadowCaster" pass is sampling these camera-aligned textures and discarding shadow-map pixels incorrectly in `_ShadowmapCascadeAtlas` (used to later compute volumetric lighting), leading to its corruption and rendering artifacts (position the camera inside the capsule, open the `FrameDebugger` and observe the contents of your shadowmap at the end of the `RenderShadowMaps` section).
You have two possible workarounds here:
- If you're ok with the clipped-area not affecting the shadows/god-rays, you can add a custom HLSL block to your shadergraph, where you disable this near/far test when `SHADERPASS == SHADERPASS_SHADOWS`.
- If you want to affect the shadows/god-rays, you need near/far textures per-view (each camera, shadow-casting light, etc.) and sample the correct one based on which view you're rendering. This will increase the effect complexity significantly, but it's the only way to represent that volume-cutout correctly for all passes.