11 b.add_input<
decl::Color>(
"Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
12#define SOCK_COLOR_ID 0
13 b.add_input<
decl::Float>(
"Density").default_value(1.0f).min(0.0f).max(1000.0f);
14#define SOCK_DENSITY_ID 1
44 ntype.
ui_name =
"Volume Absorption";
45 ntype.
ui_description =
"Absorb light as it passes through the volume";
48 ntype.
declare = file_ns::node_declare;
49 ntype.
gpu_fn = file_ns::node_shader_gpu_volume_absorption;
#define NODE_CLASS_SHADER
#define SH_NODE_VOLUME_ABSORPTION
#define BLT_I18NCONTEXT_ID_ID
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ GPU_MATFLAG_VOLUME_ABSORPTION
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
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)
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
bool node_socket_not_white(const GPUNodeStack &socket)
bool node_socket_not_zero(const GPUNodeStack &socket)
void register_node_type_sh_volume_absorption()
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare