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;
72 if (node->custom1 && node->custom2) {
73 brick_width *= (
int(rownum) % node->custom2) ? 1.0f : node->custom4;
74 offset = (
int(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))
96static void exec(
void *data,
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])
draw_view in_light_buf[] float
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
ccl_device_inline float2 floor(const float2 a)
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
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_bricks()
static void colorfn(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_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
Compact definition of a node socket.
void(* initfunc)(bNodeTree *ntree, bNode *node)