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:
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_output_world.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_world.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_world.cc b/source/blender/nodes/shader/nodes/node_shader_output_world.cc
index 77146876d9d..b0cf4c80bc5 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_world.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_output_world.cc
@@ -12,16 +12,20 @@ static void node_declare(NodeDeclarationBuilder &b)
}
static int node_shader_gpu_output_world(GPUMaterial *mat,
- bNode *node,
+ bNode *UNUSED(node),
bNodeExecData *UNUSED(execdata),
GPUNodeStack *in,
- GPUNodeStack *out)
+ GPUNodeStack *UNUSED(out))
{
- GPUNodeLink *outlink;
-
- GPU_stack_link(mat, node, "node_output_world", in, out, &outlink);
- GPU_material_output_link(mat, outlink);
-
+ GPUNodeLink *outlink_surface, *outlink_volume;
+ if (in[0].link) {
+ GPU_link(mat, "node_output_world_surface", in[0].link, &outlink_surface);
+ GPU_material_output_surface(mat, outlink_surface);
+ }
+ if (in[1].link) {
+ GPU_link(mat, "node_output_world_volume", in[1].link, &outlink_volume);
+ GPU_material_output_volume(mat, outlink_volume);
+ }
return true;
}