Documentation of the core library of GPAC
VertexAttribInterpolator Interface Reference


Public Member Functions

 VertexAttribInterpolator (Float32Buffer data, long nb_components, optional AttributeMapType map=GF_EVG_VAI_VERTEX_INDEX)
 VertexAttribInterpolator (long nb_components)

Data Fields

writeonly boolean normalize

Detailed Description

Vertex attribute interpolator used by fragment shaders

Constructor & Destructor Documentation

◆ VertexAttribInterpolator() [1/2]

VertexAttribInterpolator::VertexAttribInterpolator ( Float32Buffer  data,
long  nb_components,
optional AttributeMapType  map = GF_EVG_VAI_VERTEX_INDEX 


This constructor is typically used for vertex attributes that do not need any modification at the vertex shader stage and are directly interpolated in the fragment shader

datafloat buffer containing the vertex attribute data
nb_componentsnumber of floats per attribute
mapmapping mode of attribute per vertex or primitive

◆ VertexAttribInterpolator() [2/2]

VertexAttribInterpolator::VertexAttribInterpolator ( long  nb_components)


This constructor is used for vertex attributes that are fetched through VertexAttrib in the vertex shader and need to be passed to the fragment shader

nb_componentsnumber of floats per attribute

Field Documentation

◆ normalize

writeonly boolean VertexAttribInterpolator::normalize

if set, the attribute value will be normalized upon fetch by the shader