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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-01-23 12:00:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-23 12:00:48 +0300
commit2dfe5e30ac43af0c65a7a89d8f6ebb79056eaab7 (patch)
tree8b217d98f67681dfde985667cce6fabb33c717ed /intern/cycles/render/shader.h
parent7733bd5efc8e90f85385e5a93066158a17b14a93 (diff)
Cycles: Don't re-generate blackbody/beckmann tables on every shaders update
This commit makes it so blackbody and beckmann lookup tables are stored on CPU after being generated and then only being copied to the device if needed. This solves lag of viewport update when tweaking shader tree by using 266KB of CPU memory.
Diffstat (limited to 'intern/cycles/render/shader.h')
-rw-r--r--intern/cycles/render/shader.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index 58960e7fc89..1d903ee3a13 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -170,6 +170,9 @@ protected:
typedef unordered_map<ustring, uint, ustringHash> AttributeIDMap;
AttributeIDMap unique_attribute_id;
+ vector<float> blackbody_table;
+ vector<float> beckmann_table;
+
size_t blackbody_table_offset;
size_t beckmann_table_offset;
};