[SOLVED] Washed-out UI textures after upgrading to 2x Engine only

Hey everyone! ended up upgrading to 2x recently. I now notice that my UI textures all appear washed out … what gives? I heard this may be due to rendering pipeline / gamma correction changes but I’m unable to figure it out :slightly_smiling_face: Is there like… a gamma correction or color space setting somewhere that I’m missing?

UPDATE: I’m looking at CameraComponent | Engine API Reference - v2.7.3 and using camera.gammaCorrection = 0 has solved my issue :slightly_smiling_face:

1 Like

I’d suggest you don’t change gammaCorrection on the camera.
But instead load your color textures as srgb. For example see this example: PlayCanvas Examples

it loads the texture this way, note the srgb parameter:

red_button_atlas: new pc.Asset('red_button_atlas', 'texture', {
        url: `${rootPath}/static/assets/button/red_button_atlas.png`
    }, { srgb: true })

Shouldn’t he just ensure sRGB is checked for his UI texture assets in the Inspector? :smile: I’m assuming you’re using the Editor, @Charlie_Van_Norman.

Yes if you’re using Editor, sorry, I was under the impression this was engine only, which my solution applies to.

You are correct, Engine only not Editor, I made a mistake (and have now corrected it) in the original post title.

Thanks for your solution approach @will !

I’m not sure about sRGB for my “color only” UI elements that do not have textures. Those did appear washed out for me if I remember correctly. Anyway … I’ve set gammaCorrection for my camera and have no issues for now. I’ll keep your approach in mind if I need further tweaking for the way my UI vs in-game render texture looks. (I realize I’m still a bit in the dark about all this Gamma stuff, but it ain’t broke at the moment so I’m going to work on other featuers :joy: )

2 Likes