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:
authorDalai Felinto <dfelinto@gmail.com>2017-07-14 18:40:54 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-07-14 18:46:10 +0300
commit2a489273d7e2354a9f1afc3212863ff4b463cf86 (patch)
treea12701d9ca43b6ace0993cfc31bc278eed3cc4fb /source/blender/nodes/shader/nodes/node_shader_mapping.c
parent73b142529705e75790a4b9279109763014ca63e6 (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/nodes/shader/nodes/node_shader_mapping.c')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index 2044f5390cc..7f25b298cb2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -94,7 +94,7 @@ static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
GPUNodeLink *tdomin = GPU_uniform(&domin);
GPUNodeLink *tdomax = GPU_uniform(&domax);
- GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
+ GPU_stack_link(mat, node, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
if (texmap->type == TEXMAP_TYPE_NORMAL)
GPU_link(mat, "texco_norm", out[0].link, &out[0].link);