Vertex.Vertex

void Vertex(Vec3 position, Vec3 normal)

Create a new Vertex, use the overloads to take advantage of default values. Vertex color defaults to White. UV defaults to (0,0).

   
Vec3 position Location of the Vertex, this is typically meters in Model space.
Vec3 normal The direction the Vertex is facing. Never leave this as zero, or your lighting may turn out black! A good default value if you don’t know what to put here is (0,1,0), but a Mesh composed entirely of this value will have flat lighting.
void Vertex(Vec3 position, Vec3 normal, Vec2 textureCoordinates)

Create a new Vertex, use the overloads to take advantage of default values. Vertex color defaults to White.

   
Vec3 position Location of the Vertex, this is typically meters in Model space.
Vec3 normal The direction the Vertex is facing. Never leave this as zero, or your lighting may turn out black! A good default value if you don’t know what to put here is (0,1,0), but a Mesh composed entirely of this value will have flat lighting.
Vec2 textureCoordinates What part of a texture is this Vertex anchored to? (0,0) is top left of the texture, and (1,1) is the bottom right.
void Vertex(Vec3 position, Vec3 normal, Vec2 textureCoordinates, Color32 color)

Create a new Vertex, use the overloads to take advantage of default values.

   
Vec3 position Location of the Vertex, this is typically meters in Model space.
Vec3 normal The direction the Vertex is facing. Never leave this as zero, or your lighting may turn out black! A good default value if you don’t know what to put here is (0,1,0), but a Mesh composed entirely of this value will have flat lighting.
Vec2 textureCoordinates What part of a texture is this Vertex anchored to? (0,0) is top left of the texture, and (1,1) is the bottom right.
Color32 color The color of the Vertex, StereoKit’s default shaders treat this as a multiplicative modifier for the Material’s albedo/diffuse color, but different shaders sometimes treat this value differently. A good default here is white, black will cause your model to turn out completely black.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!