Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2019-05-02 16:45:31 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-03 16:42:49 +0300
commit68b15fc3ad4f74be192150d3a2fb35e7ef2d4edd (patch)
tree26c2aa7b37c3520417acf13b4a80c3023346b1c2 /intern/cycles/kernel/osl/osl_globals.h
parentdba4684f82a179a5c8abdae5940bc7c35e65a1a7 (diff)
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
Diffstat (limited to 'intern/cycles/kernel/osl/osl_globals.h')
-rw-r--r--intern/cycles/kernel/osl/osl_globals.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index 414aaf891db..51bc5cf81a9 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -37,6 +37,7 @@ using std::isfinite;
CCL_NAMESPACE_BEGIN
class OSLRenderServices;
+class ColorSpaceProcessor;
/* OSL Texture Handle
*
@@ -53,21 +54,15 @@ class OSLRenderServices;
struct OSLTextureHandle : public OIIO::RefCnt {
enum Type { OIIO, SVM, IES, BEVEL, AO };
- OSLTextureHandle() : type(OIIO), svm_slot(-1), oiio_handle(NULL)
- {
- }
-
- OSLTextureHandle(Type type) : type(type), svm_slot(-1), oiio_handle(NULL)
- {
- }
-
- OSLTextureHandle(Type type, int svm_slot) : type(type), svm_slot(svm_slot), oiio_handle(NULL)
+ OSLTextureHandle(Type type = OIIO, int svm_slot = -1)
+ : type(type), svm_slot(svm_slot), oiio_handle(NULL), processor(NULL)
{
}
Type type;
int svm_slot;
OSL::TextureSystem::TextureHandle *oiio_handle;
+ ColorSpaceProcessor *processor;
};
typedef OIIO::intrusive_ptr<OSLTextureHandle> OSLTextureHandleRef;