Creates a Mesh. The capacity of the Mesh must be provided upfront, using either a vertex count or the vertex data itself. A custom vertex format can be given to specify the set of attributes in each vertex, which get sent to the vertex shader. If the format isn't given, the default vertex format will be used:
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.
A Blob containing vertex data, formatted according to the vertex format. The size of the Blob will be used to set the vertex count of the Mesh, and must be a multiple of the vertex size.
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.
A table of attributes describing the format of each vertex. Each attribute is a table that must have name and type keys, where the name is a string and the type is a DataType. Attributes can also have an offset key, which is a byte offset relative to the start of the vertex. As a shorthand, the name and type can be given as a pair without keys. Additionally, the format can have a stride key to set the number of bytes between subsequent vertices.
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.
A table of attributes describing the format of each vertex. Each attribute is a table that must have name and type keys, where the name is a string and the type is a DataType. Attributes can also have an offset key, which is a byte offset relative to the start of the vertex. As a shorthand, the name and type can be given as a pair without keys. Additionally, the format can have a stride key to set the number of bytes between subsequent vertices.
vertices
table
A table of vertices, formatted according to the vertex format. The length of the table will be used to set the vertex count of the Mesh.
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.
A table of attributes describing the format of each vertex. Each attribute is a table that must have name and type keys, where the name is a string and the type is a DataType. Attributes can also have an offset key, which is a byte offset relative to the start of the vertex. As a shorthand, the name and type can be given as a pair without keys. Additionally, the format can have a stride key to set the number of bytes between subsequent vertices.
A Blob containing vertex data, formatted according to the vertex format. The size of the Blob will be used to set the vertex count of the Mesh, and must be a multiple of the vertex size.
An optimization hint indicating that raytracing data will be frequently rebuilt. Set this to false for meshes that have static geometry.
.fasttrace
boolean
true
An optimization hint indicating that raytracing data should be optimized for fast tracing in shaders instead of fast rebuilds.
.fastbuild
boolean
false
An optimization hint indicating that raytracing data should be optimized for fast rebuilds instead of fast tracing. If fasttrace and fastbuild are both set, fasttrace wins.
.compress
boolean
false
An optimization hint indicating that raytracing data should use less VRAM, possibly at the cost of performance.