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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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.