Fix for bad Volumetric Lightmap Interpolation on Mobile

Here’s a solution to this volumetric lightmap interpolation bug on mobile devices in 4.27:


(This is previewed on desktop using Android Vulkan, but it’s the same behaviour on device)

The shaders for desktop VLM interpolation use values of 256 (look for ComputeBrickLayoutPosition in usf files), so replacing BrickDataDimensions with an inline value of 256 seems to fix it (in PrecomputedVolumetricLightmap.cpp):
Before:
const FIntVector BrickLayoutPosition = ComputeBrickLayoutPosition(BrickIndex, BrickDataDimensions);
After:
const FIntVector BrickLayoutPosition = ComputeBrickLayoutPosition(BrickIndex, FIntVector(256, 256, 256));

Like so:

And here’s the result!

Kudos to Donny and Alex at Digital Lode for the solution! Figured I’d post it here in case some stragglers come across it.

Note: This is an engine source modification, if you’re running a non-source build, you’ll have to get your hands dirty

3 Likes

You just saved me so many hours of searching. Thank you!!! Verified worked for us for the same problem.