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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-01 17:06:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-01 17:06:42 +0300
commit9d5edf2d39c73b50dfbdcd10f32e89435c95dcc9 (patch)
tree1d9b196bc4219952df5fd69c226c49d4334f77e4 /source/blender/gpu/intern/gpu_codegen.c
parentc2316909ff4f56094a0da88d0ad20edeff9327b8 (diff)
Eevee: Fix nodegroup sockets behaviour
Node group inputs should behave like cycles now. ---- We create dummy nodes that contains the default values for the nodegroup inputs and link them to the sockets. This way the uniform buffer gathering function can read them. But we also need to disconnect all the internal links to sockets that have hidden values. Theses sockets must not get the values from the nodegroup input sockets if there is no link to them otherwise we get broken results (i.e.: normals for a bsdf node).
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 808cb985bf5..df4ab09998b 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1409,19 +1409,11 @@ static GPUNodeLink *gpu_uniformbuffer_link(
{
bNodeSocket *socket;
- /* Some nodes can have been create on the fly and does
- * not have an original to point to. (i.e. the bump from
- * ntree_shader_relink_displacement). In this case just
- * revert to static constant folding. */
- if (node->original == NULL) {
- return NULL;
- }
-
if (in_out == SOCK_IN) {
- socket = BLI_findlink(&node->original->inputs, index);
+ socket = BLI_findlink(&node->inputs, index);
}
else {
- socket = BLI_findlink(&node->original->outputs, index);
+ socket = BLI_findlink(&node->outputs, index);
}
BLI_assert(socket != NULL);