22 b.add_input<
decl::Color>(
"Base Color"_ustr).default_value({0.8f, 0.8f, 0.8f, 1.0f});
23 b.add_input<
decl::Color>(
"Specular"_ustr).default_value({0.03f, 0.03f, 0.03f, 1.0f});
29 b.add_input<
decl::Color>(
"Emissive Color"_ustr).default_value({0.0f, 0.0f, 0.0f, 1.0f});
46 b.add_input<
decl::Vector>(
"Clear Coat Normal"_ustr).hide_value();
47 b.add_input<
decl::Float>(
"Weight"_ustr).available(is_gpu_internal);
67 bool use_transparency =
in[4].socket_not_zero();
68 bool use_coat =
in[6].socket_not_zero();
72 if (
in[1].might_be_tinted()) {
78 if (use_transparency) {
84 float use_coat_f = use_coat ? 1.0f : 0.0f;
87 "node_eevee_specular",
105 ntype.
ui_name =
"Specular BSDF";
107 "Similar to the Principled BSDF node but uses the specular workflow instead of metallic, "
108 "which functions by specifying the facing (along normal) reflection color. Energy is not "
109 "conserved, so the result may not be physically accurate";
112 ntype.
declare = file_ns::node_declare;
115 ntype.
gpu_fn = file_ns::node_shader_gpu_eevee_specular;
#define NODE_CLASS_SHADER
#define SH_NODE_EEVEE_SPECULAR
void node_register_type(bNodeType &ntype)
static int node_shader_gpu_eevee_specular(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ GPU_MATFLAG_REFLECTION_MAYBE_COLORED
@ GPU_MATFLAG_TRANSPARENT
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 search_link_ops_for_shader_bsdf_node(nodes::GatherLinkSearchOpParams ¶ms)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
bool object_eevee_shader_nodes_poll(const bContext *C)
GPUNodeLink * GPU_shading_data()
@ NTREE_IS_GPU_SHADER_INTERNAL
void register_node_type_sh_eevee_specular()
GPUNodeLink * GPU_kernel_globals()
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
bool(*) add_ui_poll(const bContext *C)