Working in linear color space

Hi there,

I’ve searched the forums for answers to my questions and couldn’t find anything concrete, mainly due to poorly asked questions.

I want to convert our current project to linear color space for the lighting benefits and would like to know the correct procedure :slight_smile:
I have already started playing with it and have really noticed the improved quality of post effects such as Bloom and Tonemapping working correctly.

But could someone please layout the best workflow to me? I would like to know we are going about things the correct way.
First step would be to change the player settings color space to Linear obviously!

Working in Photoshop, I work using the sRGB color profile. Do I need to use any particular file formats or apply any correction at this stage? I have seen *.exr file formats mentioned.
What are the right settings for importing textures to be used in linear space? In the advanced texture importing settings, I see options like ‘Bypass sRGB sampling’, ‘In Linear Space’… etc.
When it comes time to making this work with shaders, what type of things do I need to keep in mind regards finally gamma correcting my linear scene. Do I need to add my gamma correction equations to all the shaders being used or I was thinking writing a fullscreen image effect that applies gamma correction.

That’s a lot of questions, but I appreciate everyones time and I’m sure the answers will help a lot of other people as it seems to be a common source of questions.

Thanks!

Bumperrr

Hey,

working in sRGB is the right approach. Do not check “Bypass sRGB sampling” unless you’re working with GUI textures. For simple Colors in Unity add a gamma of 0.454545 (i think the color picker don’t get the memo to linear space)

The alpha channel in linear lighting is still incorrect. http://forum.unity3d.com/threads/140850-Incorrect-alpha-channel-in-linear-lighting (I already submitted a bug report)

Good Tutorial / Documentations for working in Linear Space

http://filmicgames.com/archives/299

Did this ever get fixed? I am still seeing this problem in my custom fragment shader in Unity 4.5.2. Here’s another thread that reports the problem: Incorrect alpha channel in linear lighting - Unity Engine - Unity Discussions

Attached is a picture that demonstrates the difference of manually adding pow(albedo.a, 2.2) to the fragment shader.

I probed a bit deeper and found different results for different textures being imported. The problem seems to stem from .PNG files being imported with Alpha is Transparency. Still not sure why.

Has this been fixed?