13 b.add_input<
decl::Color>(
"Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
36 case NodeItem::Type::BSDF: {
37 NodeItem color = get_input_value(
"Color", NodeItem::Type::Color3);
39 return create_node(
"oren_nayar_diffuse_bsdf", NodeItem::Type::BSDF, {{
"color", color}});
41 case NodeItem::Type::SurfaceOpacity: {
42 NodeItem color = get_input_value(
"Color", NodeItem::Type::Color3);
44 return val(1.0f) - color.dotproduct(val(1.0f / 3.0f));
65 ntype.
declare = file_ns::node_declare;
66 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_ray_portal;
#define NODE_CLASS_SHADER
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ GPU_MATFLAG_TRANSPARENT
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static int node_shader_gpu_bsdf_ray_portal(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_bsdf_ray_portal()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bool object_shader_nodes_poll(const bContext *C)
NodeMaterialXFunction materialx_fn
bool(* add_ui_poll)(const bContext *C)
NodeGPUExecFunction gpu_fn
NodeDeclareFunction declare