Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Vertex.h
1#pragma once
2
3#include <glm/glm.hpp>
4
15struct Vertex {
19 Vertex() = default;
20
25 Vertex(glm::vec3 pos) : position(glm::vec4(pos, 0.0f)) {}
26
27 glm::vec4 position = glm::vec4(0.0f);
28 glm::vec4 normal = glm::vec4(0.0f);
29 glm::vec4 tangent = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
30 glm::vec2 textureCoordinate = glm::vec2(0.0f);
31 glm::vec2 lightmapUvCoordinate = glm::vec2(0.0f);
32};
33
34static_assert(sizeof(Vertex) == 64, "Vertex struct size mismatch");
35
49 glm::uvec4 jointIndices = glm::uvec4(0);
50 glm::vec4 jointWeights = glm::vec4(0.0f);
51};
52
53static_assert(sizeof(BoneVertexData) == 32, "BoneVertexData struct size mismatch");
Definition EcsData.h:61
Per-vertex bone influence data for skeletal mesh skinning.
Definition Vertex.h:48
glm::uvec4 jointIndices
4 bone indices (16 bytes)
Definition Vertex.h:49
glm::vec4 jointWeights
4 bone weights (16 bytes)
Definition Vertex.h:50
The fundamental building block of all meshes in this engine.
Definition Vertex.h:15
glm::vec2 lightmapUvCoordinate
Lightmap texture coordinates.
Definition Vertex.h:31
glm::vec4 normal
xyz = normal, w = unused.
Definition Vertex.h:28
Vertex(glm::vec3 pos)
Creates a vertex with only the position initialized.
Definition Vertex.h:25
glm::vec4 tangent
xyz = tangent, w = handedness (+1/-1).
Definition Vertex.h:29
glm::vec4 position
xyz = position, w = unused.
Definition Vertex.h:27
glm::vec2 textureCoordinate
Primary texture coordinates.
Definition Vertex.h:30
Vertex()=default
Creates a zero-initialized vertex.