Raster Overlay Compression

Is there any compression being done to the images between setting up the Texture2d and getting access to them within the MaterialLayer?

I am using a PNG on my imagery server with the image type r8g8b8a8. I use one of the channels to swap to a different material based on the pixel value, but the pixel values do not correlate to the images when I inspect them with GIMP. I would expect value 13 to be water but it’s coming through as 1, and grass should be 45 but is 7. Other color values seemed to have been lumped together as well because my water is in more places than the images say.

I was able to look at the pixel data of the image within CesiumTextureUtility and the values were coming out as I would expect. But once I was using them within the Material Layer I couldn’t discern the proper values for all my materials.

There’s no compression, but raster overlay textures are always treated as sRGB. When you read such a texture in a Material, Unreal wil provide the linear value, which will be different from the original.

I wrote an issue to address this: