diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-07-14 18:40:54 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-07-14 18:46:10 +0300 |
commit | 2a489273d7e2354a9f1afc3212863ff4b463cf86 (patch) | |
tree | a12701d9ca43b6ace0993cfc31bc278eed3cc4fb /source/blender/blenkernel/intern/node.c | |
parent | 73b142529705e75790a4b9279109763014ca63e6 (diff) |
Implement Uniformbuffer objects for nodetree parameters
For users that means you can tweak shaders in the nodetree and things
are way faster. This is a huge improvement, particularly in
systems that have no shader cache.
From the code perspective it means we are no longer re-compiling the
shader every time a value is tweaked in the UI. We are using uniforms
for those values.
It would be slow to add that many uniforms for all the shaders. So
instead we are using UBO (Uniform Buffer Objects).
This fixes the main issue of T51467. However GWN_shaderinterface_create() still
needs to be improvedi. When opening a .blend all shaders are compiled once, so
optimizing it will bring a measurable impact.
========================================================================
NOTE: This breaks update of Cycles material upon nodetree nodes
tweaking. It will be fixed separately by depsgraph, once tackling T51925
(Animated Eevee values slowdown).
The idea is to make Depsgraph update more granular. The XXX TODO in
rna_nodetree.c will be tackled at that time as well.
========================================================================
Reviewers: sergey, brecht, fclem
Differential Revision: https://developer.blender.org/D2739
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 0ec6d930e07..05d6b981dc1 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2025,7 +2025,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree) for (node = ntree->nodes.first; node; node = node->next) { /* store new_node pointer to original */ - node->new_node->new_node = node; + node->new_node->original = node; } if (ntree->typeinfo->localize) |