22 b.add_input<
decl::Color>(
"Color"_ustr).default_value({1.0f, 1.0f, 1.0f, 1.0f});
23 b.add_input<
decl::Float>(
"Distance"_ustr).default_value(1.0f).min(0.0f).max(1000.0f);
55 "node_ambient_occlusion",
82 return get_output_default(socket_out_->identifier, NodeItem::Type::Any);
97 ntype.
ui_name =
"Ambient Occlusion";
99 "Compute how much the hemisphere above the shading point is occluded, for example to add "
100 "weathering effects to corners.\nNote: For Cycles, this may slow down renders significantly";
103 ntype.
declare = file_ns::node_declare;
104 ntype.
draw_buttons = file_ns::node_shader_buts_ambient_occlusion;
105 ntype.
initfunc = file_ns::node_shader_init_ambient_occlusion;
106 ntype.
gpu_fn = file_ns::node_shader_gpu_ambient_occlusion;
#define SH_NODE_AMBIENT_OCCLUSION
ccl_device_inline float3x3 inverted(const float3x3 m)
void node_register_type(bNodeType &ntype)
static void node_shader_buts_ambient_occlusion(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_shader_init_ambient_occlusion(bNodeTree *, bNode *node)
static int node_shader_gpu_ambient_occlusion(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
@ ITEM_R_SPLIT_EMPTY_NAME
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GPUNodeLink * GPU_constant(const float *num)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
GPUNodeLink * GPU_shading_data()
MINLINE uint divide_ceil_u(uint a, uint b)
GPUNodeLink * GPU_kernel_globals()
void register_node_type_sh_ambient_occlusion()
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
NodeMaterialXFunction materialx_fn
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGPUExecFunction gpu_fn
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)