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:
authorBrecht Van Lommel <brecht@blender.org>2022-01-25 15:25:33 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-01-25 19:14:20 +0300
commitc813a1b3583e9a3bf17c75e16995ebadb046361a (patch)
tree8f5405c7f0a05aef8d43342764fc0a42ef577a54 /intern/cycles/scene/shader_nodes.h
parenteab066cbf2da1fdb8162d9ed814a9491f9acf02d (diff)
Cycles: add Point Info node
With (center) position, radius and random value outputs. Eevee does not yet support rendering point clouds, but an untested implementation of this node was added for when it does. Ref T92573
Diffstat (limited to 'intern/cycles/scene/shader_nodes.h')
-rw-r--r--intern/cycles/scene/shader_nodes.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/intern/cycles/scene/shader_nodes.h b/intern/cycles/scene/shader_nodes.h
index 0faefd3041f..a8d5bdcf157 100644
--- a/intern/cycles/scene/shader_nodes.h
+++ b/intern/cycles/scene/shader_nodes.h
@@ -1005,9 +1005,20 @@ class HairInfoNode : public ShaderNode {
{
return true;
}
- virtual int get_feature()
+};
+
+class PointInfoNode : public ShaderNode {
+ public:
+ SHADER_NODE_CLASS(PointInfoNode)
+
+ void attributes(Shader *shader, AttributeRequestSet *attributes);
+ bool has_attribute_dependency()
+ {
+ return true;
+ }
+ bool has_spatial_varying()
{
- return ShaderNode::get_feature() | KERNEL_FEATURE_NODE_HAIR;
+ return true;
}
};