API Reference

Class List

pc.VertexAttributeDescription

Summary

Properties

[normalize]

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader.

components

The number of components of the vertex attribute.

semantic

The meaning of the vertex element.

type

The data type of the attribute.

Details

Constructor

VertexAttributeDescription(semantic, components, type, [normalize])

Interface for describing a vertex attribute in pc.VertexFormat.

Parameters

semanticstring

The meaning of the vertex element. This is used to link the vertex data to a shader input. Can be:

If vertex data has a meaning other that one of those listed above, use the user-defined semantics: pc.SEMANTIC_ATTR0 to pc.SEMANTIC_ATTR15.

componentsnumber

The number of components of the vertex attribute. Can be 1, 2, 3 or 4.

typenumber

The data type of the attribute. Can be:

normalizeboolean

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader. If false, vertex attribute data is left unchanged. If this property is unspecified, false is assumed.

Properties

boolean[normalize]

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader. If false, vertex attribute data is left unchanged. If this property is unspecified, false is assumed.

numbercomponents

The number of components of the vertex attribute. Can be 1, 2, 3 or 4.

stringsemantic

The meaning of the vertex element. This is used to link the vertex data to a shader input. Can be:

If vertex data has a meaning other that one of those listed above, use the user-defined semantics: pc.SEMANTIC_ATTR0 to pc.SEMANTIC_ATTR15.