31 "The value used to map onto the color gradient. 0.0 results in the leftmost color, "
32 "while 1.0 results in the rightmost");
58 mul_bias[1] = -mul_bias[0] * coba->
data[0].
pos;
61 "valtorgb_opti_linear",
71 "valtorgb_opti_constant",
79 mul_bias[1] = -mul_bias[0] * coba->
data[0].
pos;
113 builder.single_input<
float>(
"Value");
115 builder.single_output<
float>(
"Alpha");
128 mask.foreach_index([&](
const int64_t i) {
148 NodeItem res = empty();
163 ntype.
declare = file_ns::sh_node_valtorgb_declare;
164 ntype.
initfunc = file_ns::node_shader_init_valtorgb;
168 ntype.
gpu_fn = file_ns::gpu_shader_valtorgb;
void BKE_colorband_evaluate_table_rgba(const ColorBand *coba, float **array, int *size)
bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
ColorBand * BKE_colorband_add(bool rangetype)
#define NODE_CLASS_CONVERTER
MINLINE float max_ff(float a, float b)
@ COLBAND_INTERP_CONSTANT
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *r_row)
GPUNodeLink * GPU_uniform(const float *num)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Signature & signature() const
void set_signature(const Signature *signature)
void construct_and_set_matching_fn(Args &&...args)
ColorBandFunction(const ColorBand &color_band)
void call(const IndexMask &mask, mf::Params params, mf::Context) const override
local_group_size(16, 16) .push_constant(Type b
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
static void node_shader_init_valtorgb(bNodeTree *, bNode *node)
static void sh_node_valtorgb_build_multi_function(nodes::NodeMultiFunctionBuilder &builder)
static void sh_node_valtorgb_declare(NodeDeclarationBuilder &b)
static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_valtorgb()
void sh_fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
NodeMaterialXFunction materialx_fn
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare