Blender V5.0
blender::nodes::node_geo_uv_tangent_cc Namespace Reference

Classes

class  TangentFieldInput

Enumerations

enum class  Method { Exact = 0 , Fast = 1 }

Functions

static void node_declare (NodeDeclarationBuilder &b)
static float3 compute_triangle_tangent (const float3 &p1, const float3 &p2, const float3 &p3, const float2 &uv1, const float2 &uv2, const float2 &uv3)
static void calc_uv_tangents_simple (const Span< float3 > positions, const Span< int > corner_verts, const Span< int3 > corner_tris, const GroupedSpan< int > vert_to_corners_map, const Span< float3 > uvs, MutableSpan< float3 > r_corner_tangents)
static void node_geo_exec (GeoNodeExecParams params)
static void node_register ()

Variables

static EnumPropertyItem method_items []

Enumeration Type Documentation

◆ Method

Enumerator
Exact 
Fast 

Definition at line 14 of file node_geo_uv_tangent.cc.

Function Documentation

◆ calc_uv_tangents_simple()

void blender::nodes::node_geo_uv_tangent_cc::calc_uv_tangents_simple ( const Span< float3 > positions,
const Span< int > corner_verts,
const Span< int3 > corner_tris,
const GroupedSpan< int > vert_to_corners_map,
const Span< float3 > uvs,
MutableSpan< float3 > r_corner_tangents )
static

◆ compute_triangle_tangent()

float3 blender::nodes::node_geo_uv_tangent_cc::compute_triangle_tangent ( const float3 & p1,
const float3 & p2,
const float3 & p3,
const float2 & uv1,
const float2 & uv2,
const float2 & uv3 )
static

Definition at line 43 of file node_geo_uv_tangent.cc.

References blender::math::safe_rcp().

◆ node_declare()

void blender::nodes::node_geo_uv_tangent_cc::node_declare ( NodeDeclarationBuilder & b)
static

◆ node_geo_exec()

void blender::nodes::node_geo_uv_tangent_cc::node_geo_exec ( GeoNodeExecParams params)
static

Definition at line 225 of file node_geo_uv_tangent.cc.

References node_geo_exec(), and params.

Referenced by node_geo_exec(), and node_register().

◆ node_register()

Variable Documentation

◆ method_items

EnumPropertyItem blender::nodes::node_geo_uv_tangent_cc::method_items[]
static
Initial value:
= {
"EXACT",
0,
N_("Exact"),
N_("Calculation using the MikkTSpace library, consistent with tangents used elsewhere in "
"Blender")},
{int(Method::Fast),
"FAST",
0,
N_("Fast"),
N_("Significantly faster method that approximates tangents interpolated across face corners "
"with matching UVs. For a value actually tangential to the surface, use the cross product "
"with the normal.")},
{0, nullptr, 0, nullptr, nullptr},
}
#define N_(msgid)

Definition at line 19 of file node_geo_uv_tangent.cc.

Referenced by node_declare().