No, I’m not using a render target anymore. I took that out when I made the changes. It’s a plain UTexture2D.
The UpdateTexture() was there from when I was trying to copy the texture to a transient uncompressed texture, but I was never able to get that to work.
There is zero manipulation of InTexture. They are assets that are put into a list and I iterate over them reading them and putting them into another texture.
This all works fine if I render to a texture and read from the render texture using ReadPixels().
I’ve already posted the read code above. The rest is in blueprints and it works fine because when I swap out my read function with rendering to texture and ReadPixels(), it works fine.
I think I see - your code is assuming that the data is always stored as FColor but that’s not the case - other formats will be linear color, or floats etc.
I don’t know - your output image here looks like it’s addressing something that’s 4 times smaller (larger???) which would be the difference between an FColor and an FLinearColor - or something along those lines.
FColor is smaller. So a FLinearColor buffer should be way bigger. This is doing the opposite. But I think you’re on to something here. I think the artifacts are happening on textures where all three RGB channels are the same. I already checked the source files way back. They’re all 24 bit pngs. So UE must automatically convert them to grayscale.
That would mean these are one byte textures. I’d need to check if they are grayscale. Let me see if I can detect that.