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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user