diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-31 03:49:38 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-31 03:49:38 +0400 |
commit | 29f6616d609fbd92cf313b0fdec555c2fcb4ede0 (patch) | |
tree | e0c9500368c5210071cb841ea86f5674b0cf6f25 /intern/cycles/device/device_memory.h | |
parent | 60ff60dcdc9f43891fb8a19e10f9bb7964a539bf (diff) |
Cycles: viewport render now takes scene color management settings into account,
except for curves, that's still missing from the OpenColorIO GLSL shader.
The pixels are stored in a half float texture, converterd from full float with
native GPU instructions and SIMD on the CPU, so it should be pretty quick.
Using a GLSL shader is useful for GPU render because it avoids a copy through
CPU memory.
Diffstat (limited to 'intern/cycles/device/device_memory.h')
-rw-r--r-- | intern/cycles/device/device_memory.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h index d27dd19cc96..18e6242d23d 100644 --- a/intern/cycles/device/device_memory.h +++ b/intern/cycles/device/device_memory.h @@ -46,7 +46,8 @@ enum DataType { TYPE_UCHAR, TYPE_UINT, TYPE_INT, - TYPE_FLOAT + TYPE_FLOAT, + TYPE_HALF }; static inline size_t datatype_size(DataType datatype) @@ -56,6 +57,7 @@ static inline size_t datatype_size(DataType datatype) case TYPE_FLOAT: return sizeof(float); case TYPE_UINT: return sizeof(uint); case TYPE_INT: return sizeof(int); + case TYPE_HALF: return sizeof(half); default: return 0; } } @@ -147,6 +149,11 @@ template<> struct device_type_traits<float4> { static const int num_elements = 4; }; +template<> struct device_type_traits<half4> { + static const DataType data_type = TYPE_HALF; + static const int num_elements = 4; +}; + /* Device Memory */ class device_memory |