17 {
SOCK_RGBA,
N_(
"Bricks 1"), 0.596f, 0.282f, 0.0f, 1.0f},
18 {
SOCK_RGBA,
N_(
"Bricks 2"), 0.632f, 0.504f, 0.05f, 1.0f},
41 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
42 return 0.5f * (
float(nn) / 1073741824.0f);
47 const float *co = p->
co;
70 rownum = int(
floor(
y / row_height));
74 offset = (rownum % node->
custom1) ? 0 : (brick_width * node->
custom3);
77 bricknum = int(
floor((
x + offset) / brick_width));
79 ins_x = (
x + offset) - brick_width * bricknum;
80 ins_y =
y - row_height * rownum;
82 tint =
noise((rownum << 16) + (bricknum & 0xFFFF)) + bias;
83 CLAMP(tint, 0.0f, 1.0f);
85 if (ins_x < mortar_thickness || ins_y < mortar_thickness ||
86 ins_x > (brick_width - mortar_thickness) || ins_y > (row_height - mortar_thickness))
General operations, lookup, etc. for materials.
void ramp_blend(int type, float r_col[3], float fac, const float col[3])
#define NODE_CLASS_PATTERN
MINLINE void copy_v4_v4(float r[4], const float a[4])
BMesh const char void * data
void node_register_type(bNodeType &ntype)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
static blender::bke::bNodeSocketTemplate outputs[]
static void colorfn(float *out, TexParams *p, bNode *, bNodeStack **in, short thread)
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
static blender::bke::bNodeSocketTemplate inputs[]
static void init(bNodeTree *, bNode *node)
static float noise(int n)
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
void register_node_type_tex_bricks()
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
void tex_output(bNode *node, bNodeExecData *, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void tex_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
Compact definition of a node socket.
void(* initfunc)(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy