Eevee: Fix T53413: Crash when using displacement bump relink.
ntree_shader_relink_displacement is creating a transient node that does not have a correct original to point to. In this case we revert to constant uniform.
This commit is contained in:
@@ -1589,6 +1589,15 @@ static GPUNodeLink *gpu_uniformbuffer_link(
|
||||
GPUMaterial *mat, bNode *node, GPUNodeStack *stack, const int index, const eNodeSocketInOut in_out)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user