31 switch (node->custom1) {
78 if (in0 <= 1 && in0 >= -1) {
88 if (in0 <= 1 && in0 >= -1) {
103 out[0] =
pow(in0, in1);
106 float y_mod_1 =
fmod(in1, 1);
107 if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
118 if (in0 > 0 && in1 > 0) {
119 *out =
log(in0) /
log(in1);
145 *out = (in0 < 0) ?
int(in0 - 0.5f) :
int(in0 + 0.5f);
174 *out =
fmod(in0, in1);
184 *out = in0 -
floorf(in0 / in1) * in1;
205 *out = atan2(in0, in1);
246 *out = 1.0f /
sqrtf(in0);
269 *out =
floorf(in0 / in1) * in1;
276 *out =
wrapf(in0, in1, in2);
287 *out = (
fabsf(in0 - in1) <= std::max(in2, 1e-5f)) ? 1.0f : 0.0f;
293 *out = in0 * in1 + in2;
316 CLAMP(*out, 0.0f, 1.0f);
#define NODE_CLASS_CONVERTER
@ NODE_MATH_FLOORED_MODULO
pow(value.r - subtrahend, 2.0)") .do_static_compilation(true)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
MINLINE float smoothminf(float a, float b, float c)
MINLINE float pingpongf(float value, float scale)
MINLINE float compatible_signf(float f)
MINLINE float wrapf(float value, float max, float min)
ccl_device_inline float2 fmod(const float2 a, const float b)
ccl_device_inline float2 floor(const float2 a)
ccl_device_inline float3 log(float3 v)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
void node_register_type(bNodeType *ntype)
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
void register_node_type_tex_math()
static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
void tex_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
void node_math_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
void node_math_update(bNodeTree *ntree, bNode *node)
Compact definition of a node socket.
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
void(* updatefunc)(bNodeTree *ntree, bNode *node)