diff options
author | Thomas Dinges <blender@dingto.org> | 2016-06-19 18:31:16 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2016-06-19 18:31:16 +0300 |
commit | 6311a9ff234aecb054121bf12ad03da6242fc092 (patch) | |
tree | 944abfd285251449ab9d3cccc54b37715ac4e0f6 /intern/cycles/render/image.h | |
parent | 7da189b4e8b1afed32716b6b2c127a93a35d498e (diff) |
Cycles: Support half and half4 textures.
This is an initial commit for half texture support in Cycles.
It adds the basic infrastructure inside of the ImageManager and support for these textures on CPU.
Supported:
* Half Float OpenEXR images (can be used for e.g HDRs or Normalmaps) now use 1/2 the memory, when loaded via disk (OIIO).
ToDo:
Various things like support for inbuilt half textures, GPU... will come later, step by step.
Part of my GSoC 2016.
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r-- | intern/cycles/render/image.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index 8735133fd91..01d02f4dbec 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -41,6 +41,8 @@ public: IMAGE_DATA_TYPE_BYTE4 = 1, IMAGE_DATA_TYPE_FLOAT = 2, IMAGE_DATA_TYPE_BYTE = 3, + IMAGE_DATA_TYPE_HALF4 = 4, + IMAGE_DATA_TYPE_HALF = 5, IMAGE_DATA_NUM_TYPES }; @@ -113,6 +115,9 @@ private: template<typename T> bool file_load_float_image(Image *img, ImageDataType type, device_vector<T>& tex_img); + template<typename T> + bool file_load_half_image(Image *img, ImageDataType type, device_vector<T>& tex_img); + int type_index_to_flattened_slot(int slot, ImageDataType type); int flattened_slot_to_type_index(int flat_slot, ImageDataType *type); string name_from_type(int type); |