11 b.add_input<
decl::Float>(
"IOR").default_value(1.5f).min(0.0f).max(1000.0f);
23 GPU_link(mat,
"world_normals_get", &
in[1].link);
34 return get_input_value(
"IOR", NodeItem::Type::Float);
51 "Produce a blending factor depending on the angle between the surface normal and the view "
52 "direction using Fresnel equations.\nTypically used for mixing reflections at grazing "
56 ntype.
declare = file_ns::node_declare;
57 ntype.
gpu_fn = file_ns::node_shader_gpu_fresnel;
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void node_register_type(bNodeType &ntype)
static int node_shader_gpu_fresnel(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_fresnel()
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare