# Tricubic volumetric fog filtering broken: h0.z overwritten in SampleVolumetricFogFiltered

**URL:** <https://forums.unrealengine.com/t/tricubic-volumetric-fog-filtering-broken-h0-z-overwritten-in-samplevolumetricfogfiltered/2857282>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine\
**Created:** [November 17, 2026, 9:14pm UTC](https://forums.unrealengine.com/t/tricubic-volumetric-fog-filtering-broken-h0-z-overwritten-in-samplevolumetricfogfiltered/2857282 "2026-11-17T21:14:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruben\_designer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ruben\_designer](https://forums.unrealengine.com/u/Ruben_designer)\
**Post date:** [November 17, 2026, 9:14pm UTC](https://forums.unrealengine.com/t/tricubic-volumetric-fog-filtering-broken-h0-z-overwritten-in-samplevolumetricfogfiltered/2857282/1 "2026-11-17T21:14:51Z")

</div>

### Summary

r.VolumetricFog.Filtering.Quality 2 (tricubic) samples the wrong depth because h0.z is overwritten.

### What Type of Bug are you experiencing?

Rendering (Graphics / Niagara)

### Steps to Reproduce

Add an exponential height fog with volumetric fog and a spot light with volumetric scattering.  
Set r.VolumetricFog.Jitter 0 so the edge is static.  
Compare r.VolumetricFog.Filtering.Quality 0, 1 and 2 at the cone edge near the light.

### Expected Result

File: Engine/Shaders/Private/HeightFogCommon.ush, SampleVolumetricFogFiltered(), line 492.

Description: The B-spline setup shared by bicubic and tricubic ends with:

hlsl  
h1.xy = min(h1.xy, View.VolumetricFogUVMax);  
h0.z = VolumeUV.z;

h0.z = VolumeUV.z is correct for bicubic, which filters only in XY and samples Z linearly at the original depth. The tricubic branch also uses h0.z and h1.z with the g0.z weight: lerp(tex001, tex000, g0.z). So in Z it blends the unfiltered depth with the B-spline offset h1.z, and the Z filter is wrong. In practice, quality 2 looks about the same as trilinear (froxel steps along spot light edges stay visible) or worse, while quality 1 smooths them correctly.

### Observed Result

Suggested fix: move h0.z = VolumeUV.z; inside the #elif PERMUTATION\_VOLUMETRIC\_FOG\_FILTERING\_QUALITY == 1 branch, so tricubic keeps the computed h0.z.

### Affects Versions

5.8

### Platform(s)

Windows

Pull Request: [https://github.com/EpicGames/UnrealEngine/pull/15392](https://github.com/EpicGames/UnrealEngine/pull/15392)
