NAP
Namespaces | Functions | Variables
nap::vertexid Namespace Reference

Namespaces

 shader
 

Functions

const NAPAPI std::string getUVName (int uvChannel)
 
const NAPAPI std::string getColorName (int colorChannel)
 

Variables

constexpr const char * position = "Position"
 Default mesh position vertex attribute name. More...
 
constexpr const char * normal = "Normal"
 Default mesh normal vertex attribute name
More...
 
constexpr const char * tangent = "Tangent"
 Default mesh tangent vertex attribute name
More...
 
constexpr const char * bitangent = "Bitangent"
 Default mesh bi-tangent vertex attribute name. More...
 
constexpr const char * uv = "UV0"
 Default mesh uv vertex attribute name, 1 channel. More...
 
constexpr const char * color = "Color0"
 Default mesh color attribute name, 1 channel. More...
 

Detailed Description

System defaults for the most common used mesh vertex attributes. If no bindings are specified in the material, the system will automatically try to bind the vertex data of a mesh to the inputs of a shader using these names.

When CUSTOM vertex buffers are used, you have to manually bind all the mesh vertex attributes, including the default ones, to the shader inputs. Both nap::Material and nap::MaterialInstance allow you to explicitly bind vertex data to shader inputs.

Function Documentation

◆ getColorName()

const NAPAPI std::string nap::vertexid::getColorName ( int  colorChannel)

Returns the name of the vertex color attribute based on the queried color channel, ie: "Color0", "Color1" etc.

Parameters
colorChannelthe color channel index
Returns
the name of the color vertex attribute

◆ getUVName()

const NAPAPI std::string nap::vertexid::getUVName ( int  uvChannel)

Returns the name of the vertex uv attribute based on the queried uv channel, ie: UV0, UV1 etc.

Parameters
uvChannelthe uv channel index
Returns
the name of the vertex attribute

Variable Documentation

◆ bitangent

constexpr const char* bitangent = "Bitangent"
constexpr

Default mesh bi-tangent vertex attribute name.

◆ color

constexpr const char* color = "Color0"
constexpr

Default mesh color attribute name, 1 channel.

◆ normal

constexpr const char* normal = "Normal"
constexpr

Default mesh normal vertex attribute name

◆ position

constexpr const char* position = "Position"
constexpr

Default mesh position vertex attribute name.

◆ tangent

constexpr const char* tangent = "Tangent"
constexpr

Default mesh tangent vertex attribute name

◆ uv

constexpr const char* uv = "UV0"
constexpr

Default mesh uv vertex attribute name, 1 channel.