Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/nodes.h
| Show First 20 Lines • Show All 883 Lines • ▼ Show 20 Lines | |||||
| class CurvesNode : public ShaderNode { | class CurvesNode : public ShaderNode { | ||||
| public: | public: | ||||
| explicit CurvesNode(const NodeType *node_type); | explicit CurvesNode(const NodeType *node_type); | ||||
| SHADER_NODE_BASE_CLASS(CurvesNode); | SHADER_NODE_BASE_CLASS(CurvesNode); | ||||
| virtual int get_group() { return NODE_GROUP_LEVEL_3; } | virtual int get_group() { return NODE_GROUP_LEVEL_3; } | ||||
| bool has_spatial_varying() { return true; } | |||||
| void compile(SVMCompiler& compiler, int type, ShaderInput *value_in, ShaderOutput *value_out); | |||||
| void compile(OSLCompiler& compiler, const char *name); | |||||
| array<float3> curves; | array<float3> curves; | ||||
| float min_x, max_x, fac; | float min_x, max_x, fac; | ||||
| float3 value; | float3 value; | ||||
| protected: | |||||
| void constant_fold(const ConstantFolder& folder, ShaderInput *value_in); | |||||
| void compile(SVMCompiler& compiler, int type, ShaderInput *value_in, ShaderOutput *value_out); | |||||
| void compile(OSLCompiler& compiler, const char *name); | |||||
| }; | }; | ||||
| class RGBCurvesNode : public CurvesNode { | class RGBCurvesNode : public CurvesNode { | ||||
| public: | public: | ||||
| SHADER_NODE_CLASS(RGBCurvesNode) | SHADER_NODE_CLASS(RGBCurvesNode) | ||||
| void constant_fold(const ConstantFolder& folder); | |||||
| }; | }; | ||||
| class VectorCurvesNode : public CurvesNode { | class VectorCurvesNode : public CurvesNode { | ||||
| public: | public: | ||||
| SHADER_NODE_CLASS(VectorCurvesNode) | SHADER_NODE_CLASS(VectorCurvesNode) | ||||
| void constant_fold(const ConstantFolder& folder); | |||||
| }; | }; | ||||
| class RGBRampNode : public ShaderNode { | class RGBRampNode : public ShaderNode { | ||||
| public: | public: | ||||
| SHADER_NODE_CLASS(RGBRampNode) | SHADER_NODE_CLASS(RGBRampNode) | ||||
| void constant_fold(const ConstantFolder& folder); | |||||
| virtual int get_group() { return NODE_GROUP_LEVEL_1; } | virtual int get_group() { return NODE_GROUP_LEVEL_1; } | ||||
| array<float3> ramp; | array<float3> ramp; | ||||
| array<float> ramp_alpha; | array<float> ramp_alpha; | ||||
| float fac; | float fac; | ||||
| bool interpolate; | bool interpolate; | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||