12 b.add_input<
decl::Color>(
N_(
"Color1")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
13 b.add_input<
decl::Color>(
N_(
"Color2")).default_value({0.2f, 0.2f, 0.2f, 1.0f});
78 const float3 p = (
vector[i] * scale[i] + 0.000001f) * 0.999999f;
84 r_fac[i] = ((xi % 2 == yi % 2) == (zi % 2)) ? 1.0f : 0.0f;
87 if (!r_color.is_empty()) {
89 r_color[i] = (r_fac[i] == 1.0f) ? color1[i] : color2[i];
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define SH_NODE_TEX_CHECKER
#define NODE_CLASS_TEXTURE
void nodeRegisterType(struct bNodeType *ntype)
void BKE_texture_mapping_default(struct TexMapping *texmap, int type)
void BKE_texture_colormapping_default(struct ColorMapping *colormap)
#define TEXMAP_TYPE_POINT
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void set_signature(const MFSignature *signature)
const MFSignature & signature() const
void set_matching_fn(const MultiFunction *fn)
void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
static fn::MFSignature create_signature()
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void sh_node_tex_checker_declare(NodeDeclarationBuilder &b)
static void sh_node_tex_checker_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_shader_init_tex_checker(bNodeTree *UNUSED(ntree), bNode *node)
static int node_shader_gpu_tex_checker(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_sh_tex_checker()
void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *UNUSED(out))
void node_shader_gpu_default_tex_coord(GPUMaterial *mat, bNode *node, GPUNodeLink **link)
void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare