14 b.add_input<
decl::Color>(
"Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
15 b.add_input<
decl::Float>(
"Distance").default_value(1.0f).min(0.0f).max(1000.0f);
35 GPU_link(mat,
"world_normals_get", &in[2].link);
40 float inverted = (node->custom2 &
SHD_AO_INSIDE) ? 1.0f : 0.0f;
45 "node_ambient_occlusion",
70 return get_output_default(socket_out_->name, NodeItem::Type::Any);
85 ntype.
declare = file_ns::node_declare;
86 ntype.
draw_buttons = file_ns::node_shader_buts_ambient_occlusion;
87 ntype.
initfunc = file_ns::node_shader_init_ambient_occlusion;
88 ntype.
gpu_fn = file_ns::node_shader_gpu_ambient_occlusion;
MINLINE uint divide_ceil_u(uint a, uint b)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static void node_shader_init_ambient_occlusion(bNodeTree *, bNode *node)
static void node_shader_buts_ambient_occlusion(uiLayout *layout, bContext *, PointerRNA *ptr)
static int node_shader_gpu_ambient_occlusion(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_ambient_occlusion()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeMaterialXFunction materialx_fn
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare