GeometryPipeline
Content pipeline functions for geometries.
See also
Functions
Compresses and packs geometry normal attribute values to save memory.
Computes per-vertex normals for a geometry containing TRIANGLES
by averaging the normals of all triangles incident to the vertex. The result is a new normal
attribute added to the geometry. This assumes a counter-clockwise winding order.
Computes per-vertex tangents and bitangents for a geometry containing TRIANGLES
. The result is new tangent
and bitangent
attributes added to the geometry. This assumes a counter-clockwise winding order.
Creates an object that maps attribute names to unique locations (indices) for matching vertex attributes and shader programs.
Creates a new Geometry with LINES
representing the provided attribute (attributeName
) for the provided geometry. This is used to visualize vector attributes like normals, tangents, and bitangents.
Splits a geometry into multiple geometries, if necessary, to ensure that indices in the indices
fit into unsigned shorts. This is used to meet the WebGL requirements when unsigned int indices are not supported.
Reorders a geometry's indices
to achieve better performance from the GPU's post vertex-shader cache by using the Tipsify algorithm. If the geometry primitiveType
is not TRIANGLES
or the geometry does not have an indices
, this function has no effect.
Reorders a geometry's attributes and indices
to achieve better performance from the GPU's pre-vertex-shader cache.
Converts a geometry's triangle indices to line indices. If the geometry has an indices
and its primitiveType
is TRIANGLES
, TRIANGLE_STRIP
, TRIANGLE_FAN
, it is converted to LINES
; otherwise, the geometry is not changed.
Transforms a geometry instance to world coordinates. This changes the instance's modelMatrix
to Matrix4.IDENTITY and transforms the following attributes if they are present: position
, normal
, tangent
, and bitangent
.