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_volume_info.c')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_info.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_info.c b/source/blender/nodes/shader/nodes/node_shader_volume_info.c
index 57fa2b7e582..7ccc00f1af3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_info.c
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_info.c
@@ -28,20 +28,25 @@ static bNodeSocketTemplate sh_node_volume_info_out[] = {
};
static int node_shader_gpu_volume_info(GPUMaterial *mat,
- bNode *node,
+ bNode *UNUSED(node),
bNodeExecData *UNUSED(execdata),
- GPUNodeStack *in,
+ GPUNodeStack *UNUSED(in),
GPUNodeStack *out)
{
+ if (out[0].hasoutput) {
+ out[0].link = GPU_volume_grid(mat, "color");
+ }
+ if (out[1].hasoutput) {
+ out[1].link = GPU_volume_grid(mat, "density");
+ }
+ if (out[2].hasoutput) {
+ out[2].link = GPU_volume_grid(mat, "flame");
+ }
+ if (out[3].hasoutput) {
+ out[3].link = GPU_volume_grid(mat, "temperature");
+ }
- return GPU_stack_link(mat,
- node,
- "node_volume_info",
- in,
- out,
- GPU_builtin(GPU_VOLUME_DENSITY),
- GPU_builtin(GPU_VOLUME_FLAME),
- GPU_builtin(GPU_VOLUME_TEMPERATURE));
+ return true;
}
void register_node_type_sh_volume_info(void)