Light Function Atlas not working as expected

I made a light function that uses cone math, it works great with Atlas disabled, but when Atlas is enabled it no longer works, and I need atlas for Megalights. After some tests I discovered that light functions do work, but I think something is wrong with the cone math that somehow makes it incompatible with Atlas. Please somebody help me with this, I’ll keep you updated with solutions I find.

Well it turns out even with the most basic light function, it still doesn’t work, here is the function:

Without Atlas:


With Atlas:

When I tested this with an image texture it works fine, so my guess is Absolute World Position node doesn’t work, how can I fix this or find a replacement for the node?

I have a similar issue - I have a very simple Light Function material that uses a TextureSample.

Works as expected, until I do anything to the UV input of the TextureSample - even simply adding a TexCoordinate node and connecting it to the UV causes the image to be replaced with a white gradient circle like in your screenshots. In the Material editor it looks normal, but in the viewport, a white gradient circle.

The only thing that I’ve discovered so far that doesn’t result in a white gradient circle is a Rotator, which then behaves as I would expect - the texture is visible rotates over time.

The 5.6 Light Function documentation includes this text in the restrictions:

To sample a texture, UVs should not be manipulated. However, if you do this, it’s important that the UV manipulation be aligned to the texture space edges of the light function. Otherwise, the atlas slot is not repeatable.

However it does not explain how to do this alignment. I thought perhaps it was mapping to a blank spot in the Light Function Atlas so I attempted to manipulate the UVs to reveal that images location in the atlas but nothing was working.

So I enabled visualization of the Light Function Atlas, and discovered that, when I don’t have the TexCoordinate connected, I see the expected entry in the Atlas:

But as soon as I connect the TexCoord, the image is removed from the atlas:

Which explains the failed rendering in the viewport.

This seems like it could be a bug, but I am surprised that this would not have been discovered already, since panning noise textures on directional lights to simulate cloud shadows is a very common use case for Light Functions - and that does not work now, from what I can see. Perhaps it is a configuration issue, but I have played with all the Light Function settings to no avail.

Hopefully someone recognizes this and could help point us to a solution.

PS I am using Unreal Engine 5.6.