diff options
Diffstat (limited to 'intern/cycles/render/nodes.h')
-rw-r--r-- | intern/cycles/render/nodes.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index 326f1d14168..59e00231c2c 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -92,7 +92,7 @@ class ImageSlotTextureNode : public TextureNode { class ImageTextureNode : public ImageSlotTextureNode { public: SHADER_NODE_NO_CLONE_CLASS(ImageTextureNode) - ShaderNode *clone() const; + ShaderNode *clone(ShaderGraph *graph) const; void attributes(Shader *shader, AttributeRequestSet *attributes); bool has_attribute_dependency() { @@ -126,7 +126,7 @@ class ImageTextureNode : public ImageSlotTextureNode { class EnvironmentTextureNode : public ImageSlotTextureNode { public: SHADER_NODE_NO_CLONE_CLASS(EnvironmentTextureNode) - ShaderNode *clone() const; + ShaderNode *clone(ShaderGraph *graph) const; void attributes(Shader *shader, AttributeRequestSet *attributes); bool has_attribute_dependency() { @@ -179,6 +179,12 @@ class SkyTextureNode : public TextureNode { float ozone_density; float3 vector; ImageHandle handle; + + float get_sun_size() + { + /* Clamping for numerical precision. */ + return fmaxf(sun_size, 0.0005f); + } }; class OutputNode : public ShaderNode { @@ -358,7 +364,7 @@ class PointDensityTextureNode : public ShaderNode { } ~PointDensityTextureNode(); - ShaderNode *clone() const; + ShaderNode *clone(ShaderGraph *graph) const; void attributes(Shader *shader, AttributeRequestSet *attributes); bool has_attribute_dependency() { @@ -394,7 +400,7 @@ class IESLightNode : public TextureNode { SHADER_NODE_NO_CLONE_CLASS(IESLightNode) ~IESLightNode(); - ShaderNode *clone() const; + ShaderNode *clone(ShaderGraph *graph) const; virtual int get_group() { return NODE_GROUP_LEVEL_2; @@ -1495,10 +1501,10 @@ class SetNormalNode : public ShaderNode { class OSLNode : public ShaderNode { public: - static OSLNode *create(size_t num_inputs, const OSLNode *from = NULL); + static OSLNode *create(ShaderGraph *graph, size_t num_inputs, const OSLNode *from = NULL); ~OSLNode(); - ShaderNode *clone() const; + ShaderNode *clone(ShaderGraph *graph) const; char *input_default_value(); void add_input(ustring name, SocketType::Type type); |