40 float start_slopes[
CM_TOT];
43 float range_minimums[
CM_TOT];
45 float range_dividers[
CM_TOT];
50 "curves_vector_mixed",
129 b.is_function_node();
131 b.add_input<
decl::Color>(
N_(
"Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
155 float start_slopes[
CM_TOT];
158 float range_minimums[
CM_TOT];
160 float range_dividers[
CM_TOT];
164 float black_level[4] = {0.0f, 0.0f, 0.0f, 1.0f};
165 float white_level[4] = {1.0f, 1.0f, 1.0f, 1.0f};
173 "curves_combined_only",
188 "curves_combined_rgb",
231 if (fac[i] != 1.0f) {
271 b.is_function_node();
301 float start_slopes[
CM_TOT];
304 float range_minimums[
CM_TOT];
306 float range_dividers[
CM_TOT];
311 "curves_float_mixed",
350 if (fac[i] != 1.0f) {
351 val_out[i] = (1.0f - fac[i]) * val_in[i] + fac[i] * val_out[i];
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
#define NODE_CLASS_CONVERTER
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size)
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define NODE_CLASS_OP_VECTOR
#define SH_NODE_CURVE_RGB
#define NODE_CLASS_OP_COLOR
void nodeRegisterType(struct bNodeType *ntype)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *row)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_uniform(const float *num)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color SH_NODE_CURVE_VEC
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Generates normals with round corners and may slow down renders Vector Displace the surface along an arbitrary direction White Return a random value or color based on an input seed SH_NODE_CURVE_FLOAT
void set_signature(const MFSignature *signature)
const MFSignature & signature() const
void construct_and_set_matching_fn(Args &&...args)
bool is_default_link_socket() const
CurveFloatFunction(const CurveMapping &cumap)
void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
static fn::MFSignature create_signature()
static fn::MFSignature create_signature()
CurveRGBFunction(const CurveMapping &cumap)
void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
static fn::MFSignature create_signature()
CurveVecFunction(const CurveMapping &cumap)
void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void sh_node_curve_rgb_build_multi_function(NodeMultiFunctionBuilder &builder)
static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_init_curve_vec(bNodeTree *UNUSED(ntree), bNode *node)
static void sh_node_curve_float_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_shader_init_curve_float(bNodeTree *UNUSED(ntree), bNode *node)
static void sh_node_curve_vec_declare(NodeDeclarationBuilder &b)
static void sh_node_curve_vec_build_multi_function(NodeMultiFunctionBuilder &builder)
static void sh_node_curve_rgb_declare(NodeDeclarationBuilder &b)
static void sh_node_curve_float_declare(NodeDeclarationBuilder &b)
static int gpu_shader_curve_float(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode *node)
static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_sh_curve_float()
void register_node_type_sh_curve_rgb()
void register_node_type_sh_curve_vec()
void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_curves(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_curves(bNode *node)
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare