Cycles: support loading images from arbitrary OpenColorIO color space
authorLukas Stockner <lukas.stockner@freenet.de>
Thu, 2 May 2019 13:45:31 +0000 (15:45 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 3 May 2019 13:42:49 +0000 (15:42 +0200)
commit68b15fc3ad4f74be192150d3a2fb35e7ef2d4edd
tree26c2aa7b37c3520417acf13b4a80c3023346b1c2
parentdba4684f82a179a5c8abdae5940bc7c35e65a1a7
Cycles: support loading images from arbitrary OpenColorIO color space

These are the internal changes to Cycles, for Blender integration there are no
functional changes in this commit.

Images are converted to scene linear color space on file load, and on reading
from the OpenImageIO texture cache. 8-bit images are compressed with the sRGB
transfer function to avoid precision loss while keeping memory usages low. This
also means that for common cases of 8-bit sRGB images no conversion happens at
all on image loading.

Initial patch by Lukas, completed by Brecht.

Differential Revision: https://developer.blender.org/D3491
13 files changed:
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/kernel/osl/osl_globals.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/osl.cpp
intern/cycles/render/osl.h
intern/cycles/render/shader.cpp