blender/intern
Brecht Van Lommel 7ad802cf3a Cycles/Eevee: unified and improved texture image color space handling
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.

Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.

Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.

Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.

This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.

Differential Revision: https://developer.blender.org/D4807
2019-05-13 15:56:10 +02:00
..
atomic Cleanup: comments (long lines) in atomic 2019-05-01 20:34:12 +10:00
audaspace Cleanup: clangg-format for rB157cc54ed521 2019-04-28 11:48:55 +02:00
clog Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
cycles Cycles/Eevee: unified and improved texture image color space handling 2019-05-13 15:56:10 +02:00
dualcon Cleanup: comments (long lines) in dualcon 2019-05-01 21:00:56 +10:00
eigen ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
elbeem Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
ffmpeg Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
ghost Fix T64427: WITH_HEADLESS build option 2019-05-13 17:42:21 +10:00
glew-mx ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
guardedalloc Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
iksolver Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
itasc Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
libmv Disable clang-format for Libmv 2019-04-18 12:33:04 +02:00
locale Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
memutil ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
mikktspace Cleanup: comments (long lines) in mikktspace 2019-05-01 20:41:33 +10:00
numaapi Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
opencolorio Cycles/Eevee: unified and improved texture image color space handling 2019-05-13 15:56:10 +02:00
opensubdiv Cleanup: add trailing commas to avoid right shift 2019-04-18 17:19:44 +02:00
openvdb ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
rigidbody Cleanup: comments (long lines) in rigidbody 2019-05-01 20:48:34 +10:00
smoke Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
string Cleanup: comments (long lines) in string 2019-05-01 20:32:38 +10:00
utfconv Cleanup: comments (long lines) in utfconv 2019-05-01 20:32:38 +10:00
CMakeLists.txt Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00