12 .default_value(100.0f)
15 .
description(
"Light strength before applying falloff modification");
18 "Smooth intensity of light near light sources.\n"
19 "This can avoid harsh highlights, and reduce global illumination noise. "
20 "0.0 corresponds to no smoothing; higher values smooth more");
38 NodeItem strength = get_input_value(
"Strength", NodeItem::Type::Float);
39 NodeItem smooth = get_input_value(
"Smooth", NodeItem::Type::Float);
43 return strength / (smooth + val(1.0f));
58 ntype.
declare = file_ns::node_declare;
60 ntype.
gpu_fn = file_ns::node_shader_gpu_light_falloff;
#define NODE_CLASS_OP_COLOR
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
local_group_size(16, 16) .push_constant(Type b
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
void node_register_type(bNodeType *ntype)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_light_falloff(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_light_falloff()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeMaterialXFunction materialx_fn
NodeGPUExecFunction gpu_fn
NodeDeclareFunction declare