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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2021-06-28 19:49:55 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2021-06-28 20:09:15 +0300
commita5ed075110031792212a7f6b8a171242a3f428e8 (patch)
tree68b4f93c2edcbba8e449904505a33954aa125e4c /intern/cycles/kernel/kernel_shader.h
parentafb17552e19c56daab6928ed1e2514b962770e19 (diff)
Fix T87194: custom attributes not accessible with Cycles Volume
Custom properties defined on objects are not accessible from the attribute node when rendering a volume in Cycles. This is because this case is not handled. To handle it, added a primitive type for volumes in the kernel, which is then used in the initialization of ShaderData and to check whether an attribute lookup is for a volume. `volume_attribute_float4` is also now checking the attribute element type to dispatch to the right lookup function. Reviewed By: #cycles, brecht Maniphest Tasks: T87194 Differential Revision: https://developer.blender.org/D11728
Diffstat (limited to 'intern/cycles/kernel/kernel_shader.h')
-rw-r--r--intern/cycles/kernel/kernel_shader.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h
index 92b4a9cbf9e..7f02e6fc7b3 100644
--- a/intern/cycles/kernel/kernel_shader.h
+++ b/intern/cycles/kernel/kernel_shader.h
@@ -1268,6 +1268,7 @@ ccl_device_inline void shader_eval_volume(KernelGlobals *kg,
sd->num_closure_left = max_closures;
sd->flag = 0;
sd->object_flag = 0;
+ sd->type = PRIMITIVE_VOLUME;
for (int i = 0; stack[i].shader != SHADER_NONE; i++) {
/* setup shaderdata from stack. it's mostly setup already in