Have to change colour space to gamma but it ruins my lighting

Hi there,

I’m really hoping someone can help me here. I’ve spent months getting the lighting and effects right in a number of environments but I now have to switch the colour space from linear to gamma (due to webgl, android and ios not supporting linear) and it’s destroyed all my hard work. Everything is super bright and over exposed.

Does anyone have any advice on how I can get the colours, brightness, contrast, etc from my linear build in a gamma one without having to basically start over with the lighting?

I’ll upload some screenshots but at the moment the site just hangs when I try to upload them.

Hope someone can help, thanks for reading…

I’m wondering if maybe I should have put this in the global illumination forum, would a mod be able to move it there please?

Many thanks

Screenshots added


No idea if it works, but I’d try a tonemapping effect or gamma curve on the camera first. Maybe scale down the intensity of all your lights with a script if necessary? I have no idea other than trying such things out and seeing what works best.

1 Like

I would try changing the intensity of all lights by a power of 1.0/2.2. That should get you closer to what you originally had, but you will have to tweak by hand somethings.

Something like:
Light[ ] lights = FindObjectsOfType(type of(Light)) as Light[ ];
foreach (Light light in lights)
light.intensity = Mathf.Pow(light.intensity, 1.0f / 2.0f);

1 Like

Thanks for the reply, I’ll give that a go. I’ve also been looking at Amplify Colour from the asset store. That’s helping a LOT!

Cheers! :slight_smile: