20 b.add_input<
decl::Color>(
"Color"_ustr).default_value({0.8f, 0.8f, 0.8f, 1.0f});
21#define SOCK_COLOR_ID 0
22 b.add_input<
decl::Float>(
"Density"_ustr).default_value(1.0f).min(0.0f).max(1000.0f);
23#define SOCK_DENSITY_ID 1
24 b.add_input<
decl::Float>(
"Weight"_ustr).available(is_gpu_internal);
54 ntype.
ui_name =
"Volume Absorption";
55 ntype.
ui_description =
"Absorb light as it passes through the volume";
58 ntype.
declare = file_ns::node_declare;
60 ntype.
gpu_fn = file_ns::node_shader_gpu_volume_absorption;
#define NODE_CLASS_SHADER
#define SH_NODE_VOLUME_ABSORPTION
#define BLT_I18NCONTEXT_ID_ID
void node_register_type(bNodeType &ntype)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_volume_absorption(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void register_node_type_sh_volume_absorption()
@ GPU_MATFLAG_VOLUME_ABSORPTION
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void search_link_ops_for_shader_bsdf_node(nodes::GatherLinkSearchOpParams ¶ms)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
GPUNodeLink * GPU_shading_data()
@ NTREE_IS_GPU_SHADER_INTERNAL
GPUNodeLink * GPU_kernel_globals()
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare