13 b.add_input<
decl::Color>(
"Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
27 return GPU_stack_link(mat, node,
"node_bsdf_transparent", in, out);
34 case NodeItem::Type::BSDF: {
35 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
37 return create_node(
"oren_nayar_diffuse_bsdf", NodeItem::Type::BSDF, {{
"color",
color}});
39 case NodeItem::Type::SurfaceOpacity: {
40 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
42 return val(1.0f) -
color.dotproduct(val(1.0f / 3.0f));
63 ntype.
declare = file_ns::node_declare;
64 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_transparent;
#define SH_NODE_BSDF_TRANSPARENT
#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)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_bsdf_transparent(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_bsdf_transparent()
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