19 {
SOCK_RGBA,
N_(
"Bricks 1"), 0.596f, 0.282f, 0.0f, 1.0f},
20 {
SOCK_RGBA,
N_(
"Bricks 2"), 0.632f, 0.504f, 0.05f, 1.0f},
43 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
44 return 0.5f * (
float(nn) / 1073741824.0f);
49 const float *co = p->
co;
72 rownum = int(
floor(
y / row_height));
74 if (
node->custom1 &&
node->custom2) {
75 brick_width *= (rownum %
node->custom2) ? 1.0f :
node->custom4;
76 offset = (rownum %
node->custom1) ? 0 : (brick_width *
node->custom3);
79 bricknum = int(
floor((
x + offset) / brick_width));
81 ins_x = (
x + offset) - brick_width * bricknum;
82 ins_y =
y - row_height * rownum;
84 tint =
noise((rownum << 16) + (bricknum & 0xFFFF)) + bias;
85 CLAMP(tint, 0.0f, 1.0f);
87 if (ins_x < mortar_thickness || ins_y < mortar_thickness ||
88 ins_x > (brick_width - mortar_thickness) || ins_y > (row_height - mortar_thickness))
General operations, lookup, etc. for materials.
#define NODE_CLASS_PATTERN
void node_register_type(bNodeType &ntype)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
void ramp_blend(int type, float r_col[4], float fac, const float col[4])
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
static void colorfn(float *out, TexParams *p, bNode *, bNodeStack **in, short thread)
void register_node_type_tex_bricks()
BMesh const char void * data
void tex_output(bNode *node, bNodeExecData *, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
static bke::bNodeSocketTemplate inputs[]
void tex_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
static bke::bNodeSocketTemplate outputs[]
MINLINE void copy_v4_v4(float r[4], const float a[4])
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
static constexpr int _160
Compact definition of a node socket.
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy