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:
authorThomas Dinges <blender@dingto.org>2016-05-12 15:51:42 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2016-06-08 22:45:40 +0300
commit80b305014a392353eb25efe0794cda9564418b80 (patch)
tree25b1550058218a1311db000d74963b872d872611 /intern/cycles/render/image.h
parent84794b3d5d55b12c71875d49681702f7f37a32d3 (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.h3
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);