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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-07 16:27:18 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-07 16:27:18 +0400
commit9fba458a7fe535e60f5c6beee9757fe25ffe2d49 (patch)
treee625eb73d3da32a01c84385e1976f81d2f8b92bd /intern/cycles/render/image.h
parentbdf731f03d727d3862537c59fa11477b77eb60b0 (diff)
Cycles: float texture support. Due to GPU limitations there are now 95 byte,
and 5 float image textures. For CPU render this limit will be lifted later on with image cache support. Patch by Mike Farnsworth. Also changed color space option in image/environment texture node, to show options Color and Non-Color Data, instead of sRGB and Linear, this is more descriptive, and it was not really correct to equate Non-Color Data with Linear.
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r--intern/cycles/render/image.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index 0d49a1e6b67..d789e6885e3 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -26,7 +26,10 @@
CCL_NAMESPACE_BEGIN
-#define TEX_IMAGE_MAX 100
+#define TEX_NUM_FLOAT_IMAGES 5
+#define TEX_NUM_IMAGES 95
+#define TEX_IMAGE_MAX (TEX_NUM_IMAGES + TEX_NUM_FLOAT_IMAGES)
+#define TEX_IMAGE_FLOAT_START TEX_NUM_IMAGES
class Device;
class DeviceScene;
@@ -37,7 +40,7 @@ public:
ImageManager();
~ImageManager();
- int add_image(const string& filename);
+ int add_image(const string& filename, bool& is_float);
void remove_image(const string& filename);
void device_update(Device *device, DeviceScene *dscene, Progress& progress);
@@ -56,9 +59,11 @@ private:
};
vector<Image*> images;
+ vector<Image*> float_images;
void *osl_texture_system;
bool file_load_image(Image *img, device_vector<uchar4>& tex_img);
+ bool file_load_float_image(Image *img, device_vector<float4>& tex_img);
void device_load_image(Device *device, DeviceScene *dscene, int slot);
void device_free_image(Device *device, DeviceScene *dscene, int slot);