18 .default_value(100.0f)
21 .
description(
"Light strength before applying falloff modification")
29 "Smooth intensity of light near light sources.\n"
30 "This can avoid harsh highlights, and reduce global illumination noise. "
31 "0.0 corresponds to no smoothing; higher values smooth more");
49 NodeItem strength = get_input_value(
"Strength", NodeItem::Type::Float);
50 NodeItem
smooth = get_input_value(
"Smooth", NodeItem::Type::Float);
54 return strength / (
smooth + val(1.0f));
69 ntype.
ui_name =
"Light Falloff";
71 "Manipulate how light intensity decreases over distance. Typically used for "
72 "non-physically-based effects; in reality light always falls off quadratically";
75 ntype.
declare = file_ns::node_declare;
77 ntype.
gpu_fn = file_ns::node_shader_gpu_light_falloff;
#define NODE_CLASS_OP_COLOR
#define SH_NODE_LIGHT_FALLOFF
#define BLT_I18NCONTEXT_AMOUNT
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)
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)
void register_node_type_sh_light_falloff()
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
static constexpr int _160
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare