User Scene Textures don't pass through negative values

Hi all,

I’ve been experimenting with multiple-pass post-processing effects lately, by outputting User Scene Textures that are used as inputs for subsequent post-process materials. I’m on UE5.7.

I noticed negative values are absent when fetching an UserSceneTexture, while it is supposed to be encoded into a 16-bit float pixel format. Below is a screenshot of RenderDoc where I output a gradient going from -1 to 1 horizontally. When sampling a pixel in the left half, it systematically says (0,0,0,0) when we would expect a negative rgba float.

  • I already verified that the texture is indeed 16-bit float in the positive values by checking its range (0 to 65504) and precision inside the engine.
  • Tested all different Blendable Locations, to no avail.
  • Checking “Disable Pre-exposure Scale” does nothing.

So in my understanding, something somewhere in the render pipeline does a max(0., “UserSceneTexture”) between the point it is written and the point it is sampled.

I have some trick ideas on how to dodge this issue :

  • Outputting the texture and its opposite to retrieve the full-range data when fetching (at the cost of doubling the number of problematic channels)
  • or something like a wrap-around, where the values are halved, and the negative values x < 0 are mapped to 65504 - x, and performing the inverse operation to “unpack” data when fetching (at the risk of losing some precision)

But if you guys have any insight on why this happens, if it is intended or not, a way to fix it, I’m all ears ! I have not found any helpful documentation or post on this topic :slight_smile:

1 Like