Read Pixel outputs different results depending on platform?

I’m trying to prototype a game mechanic that entails reading a single pixel from a scene capture 2D component.

The issue is that although I can get the results I want in editor on Windows, when I compile for mobile on an Android device, the same read pixel function call does not return the same color I experienced during testing in editor.

I’ve had some ideas as to what may be the issue such as color gamut, colorspace, compression, but nothing I’ve tried so far has gotten the results to be the same.

I really don’t know what else to do at the moment.

Has anyone else come across this issue and have a solution to make? Read pixel return the same color value no matter what platform you’re doing, the read pixel on?

Hi Nonlin,
It may be because the default texture compression on windows is BC1 and the compression on Android is etc - they should be fairly close, but the artifacting may be slightly different too.
You could use Linear Color textures, or no compression otherwise…

I’m reading from a render texture and I don’t think those get compressed?

Blonde moment - sorry!

No worries, I’m also trying to double check here? I don’t see any compression settings for an RT so that’s why I responded that way.

That did make me consider the normal map I had on the material I’m trying to read pixels from (via the scene capture) and I’m now testing off a solid color with no texture samples just to be safe but the results are the same, mobile sees (0,0, 0.21) and Windows sees (0,0,1).

Rendertargets do have formats - but it’s more whether it’s 16bit, 24bit or 32bit - something else to check, but that fact windows is getting full blue and mobile less than 1/4 blue sounds a bit odd…

Maybe something to do with Deffered vs Forward rendering?

Usually, last time I had similar issues anyways.
It was actually the scene capture which did not have some “stuff” which isnt avaliable on mobile, changing out the values of the final output.

Like height fog, or well, theres just so many options on a screen capture component that youd have to just go in and review it…


I have most things disabled.

But I think you are on to something.
Right now, on mobile I’m seeing some shadows or shadow like tinting showing up on the Scene Capture RT that isn’t there on Windows despite the same material. I can get the tinting out of the way by cutting out the normal map which is causing the tinting (mind you the normal map is only plugged into the normal of the material). But while the readings on mobile become more fixed as they are on windows the value is off.

So on windows with normal map or not, read out is constant, on mobile read out is different from windows, either with or without normal map but the normal map causes fluctuations in the read out and without normal map fixed read out.

Did you notice some odd shadows? Did you have to do anything custom on the material to get the same read out?

Right now I’m trying to manually fix the read out. I plotted out readings for both platforms and made a custom curve to adjust the values when on mobile. But now the biggest issue is that I want the normal map on mobile for the visual FX without it causing this fluctuations. Basically I’d like the Scene Capture to ignore the shadows? IDK if its a difference between Forward Renderer on mobile vs Desktop or something else.

No. In my case it was the fog creating a halo that distorted the base color for the vectorfield.

I ended up changing the render cature to only render explicitly from feeding it a list of actors to fix it…
For whatever reason the option to not render it wasnt working.