Skip to content

Instantly share code, notes, and snippets.

View sociofall's full-sized avatar
💫

sociofall

💫
View GitHub Profile
@sociofall
sociofall / Unreal-Tricubic-Sampling.ush
Created August 29, 2025 14:14
Tricubic Sampling for Unreal Engine – Volumetric Fog modifications
# Unreal Engine – Tricubic Sampling for Volumetric Fog
# This method provides better terminators, hiding the aliasing
## 1. Paste the function
Navigate to: Engine/Shaders/Private/HeightFogCommon.ush
At the top of the file (ex. after FogStructData struct) insert the following function:
// tricubic interpolation function for sampling the volumetric fog 3D texture
// ported from https://www.shadertoy.com/view/cts3Rj