diff options
author | Thomas Dinges <blender@dingto.org> | 2016-05-12 15:51:42 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2016-05-12 15:51:42 +0300 |
commit | 3c85e1ca1a916fe2ded9ab508f4cd55a2ee22549 (patch) | |
tree | 97d80514ed304f00ca264da319b4861ed879f60d /intern/cycles/render/image.h | |
parent | cde10e774c39bc4359259558abed6263ed15c392 (diff) |
Cycles: Add support for single channel byte textures.
This way, we also save 3/4th of memory for single channel byte textures (e.g. Bump Maps).
Note: In order for this to work, the texture *must* have 1 channel only.
In Gimp you can e.g. do that via the menu: Image -> Mode -> Grayscale
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r-- | intern/cycles/render/image.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index cf5a6e9523f..53f739cd356 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -40,6 +40,7 @@ public: IMAGE_DATA_TYPE_FLOAT4 = 0, IMAGE_DATA_TYPE_BYTE4 = 1, IMAGE_DATA_TYPE_FLOAT = 2, + IMAGE_DATA_TYPE_BYTE = 3, IMAGE_DATA_NUM_TYPES }; @@ -97,6 +98,7 @@ private: int tex_num_images[IMAGE_DATA_NUM_TYPES]; int tex_image_byte4_start; int tex_image_float_start; + int tex_image_byte_start; thread_mutex device_mutex; int animation_frame; @@ -106,6 +108,7 @@ private: bool file_load_image_generic(Image *img, ImageInput **in, int &width, int &height, int &depth, int &components); bool file_load_byte4_image(Image *img, device_vector<uchar4>& tex_img); + bool file_load_byte_image(Image *img, device_vector<uchar>& tex_img); bool file_load_float4_image(Image *img, device_vector<float4>& tex_img); bool file_load_float_image(Image *img, device_vector<float>& tex_img); |