Fog/smoke in front of alpha-blended surfaces is dropped over them (hard dithered cut-out) #1288

Open
opened 2026-10-29 07:12:46 +00:00 by sky_line · 0 comments
Owner

Fog / smoke in front of an alpha-blended surface is lost over that surface. In the owner's screenshot, a dark smoke plume crosses an alpha-blended surface, and where the surface is behind the plume the fog is missing: the surface shows through un-fogged, with a hard, dotted (dithered) edge around its outline.

Likely cause: the fog / particle-fog / medium composite is applied against opaque depth before the alpha-blend pass, and the alpha surfaces drawn afterwards overwrite it. The dotted outline suggests a dithered or half-resolution edge test along the alpha surface boundary.

Fix direction (to investigate):

  • Apply the camera-medium / volumetric fog to alpha-blended surfaces at their own depth (per-fragment medium lookup in the alpha shaders, froxel sampling). Then composite fog that lies in front of an alpha surface after that surface, or split the integration at the alpha surface's depth.
  • Check every fog source: haze / camera medium (#1266), volumetric fog, particle fog (VKPartFog), local mist.
  • No extra full-screen pass if the froxel volume can be sampled in the alpha pass. Keep the cost fixed.
  • Check the case from the screenshot (smoke between the camera and an alpha surface) and the reverse case (alpha surface in front of fog).
Fog / smoke in front of an alpha-blended surface is lost over that surface. In the owner's screenshot, a dark smoke plume crosses an alpha-blended surface, and where the surface is behind the plume the fog is missing: the surface shows through un-fogged, with a hard, dotted (dithered) edge around its outline. **Likely cause:** the fog / particle-fog / medium composite is applied against opaque depth before the alpha-blend pass, and the alpha surfaces drawn afterwards overwrite it. The dotted outline suggests a dithered or half-resolution edge test along the alpha surface boundary. **Fix direction (to investigate):** - Apply the camera-medium / volumetric fog to alpha-blended surfaces at their own depth (per-fragment medium lookup in the alpha shaders, froxel sampling). Then composite fog that lies in front of an alpha surface after that surface, or split the integration at the alpha surface's depth. - Check every fog source: haze / camera medium (#1266), volumetric fog, particle fog (VKPartFog), local mist. - No extra full-screen pass if the froxel volume can be sampled in the alpha pass. Keep the cost fixed. - Check the case from the screenshot (smoke between the camera and an alpha surface) and the reverse case (alpha surface in front of fog).
sky_line added this to the Slipstream project 2026-10-29 07:12:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1288
No description provided.