Figure: Diagnostic workflow: Particle own distance → Blend-appropriate fog → Compare near/far blending
Figure: Diagnostic workflow: Particle own distance → Blend-appropriate fog → Compare near/far blending

Cause and mechanism

Fog blends distant objects toward a fog color. If particles do not blend into it correctly, check Shader fog support and how Alpha or Additive blending combines their color with the background. Scene Depth measures the background surface, so it cannot simply stand in for the particle's own distance.

Check and correct the setup

  1. Compare with standard URP particle shaders and inspect fog variants/math.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation
  2. Use the matching URP fog functions with the correct distance.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation
  3. For additive blending, fade the contribution toward zero; adding fog color as in alpha blending can brighten the haze.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation

Limits and verification

Compare near/far and both projections, distinguishing per-shader support from scene fog configuration.

A focused diagnostic setup

Compare an opaque cube and transparent particle at equal near/far distances. Test alpha and additive materials separately.

Test in this order

  1. Establish behavior with a standard URP particle shader.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation
  2. Compare custom fog variants and distance input without post-processing.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation
  3. Check background blending for alpha and fading additive contribution toward zero at distance.
    Density and supported surfaces depend on implementation
    Density and supported surfaces depend on implementation

Interpret the result

Opaque-only correctness suggests the particle shader; shared failure suggests scene fog/distance. Adding fog color through additive blending can brighten the distance, so do not copy alpha compositing unchanged.

Related explanations

References