Difference between revisions of "VertexAttributeStep"

(Created page)
 
m
 
Line 5: Line 5:
  
 
== Constants ==
 
== Constants ==
;pervertex: The vertex attribute will have a unique value for each vertex in the Mesh.
+
;pervertex: The vertex attribute will have a unique value for each vertex in the Mesh within a single instance.
 
;perinstance: The vertex attribute will have a unique value for each [[love.graphics.drawInstanced|instance]] of the Mesh.
 
;perinstance: The vertex attribute will have a unique value for each [[love.graphics.drawInstanced|instance]] of the Mesh.
  

Latest revision as of 23:52, 9 October 2020

Available since LÖVE 11.0
This enum is not supported in earlier versions.

The frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn.

Per-instance attributes can be used to render a Mesh many times with different positions, colors, or other attributes via a single love.graphics.drawInstanced call, without using the love_InstanceID vertex shader variable.

Constants

pervertex
The vertex attribute will have a unique value for each vertex in the Mesh within a single instance.
perinstance
The vertex attribute will have a unique value for each instance of the Mesh.

See Also

Other Languages