2
3
4
5
12 std::vector<VkVertexInputBindingDescription>
InputAssembly::GetBindingDescriptions()
16 std::vector<VkVertexInputBindingDescription> bindingDescriptions(1);
18 bindingDescriptions[0].binding = 0;
19 bindingDescriptions[0].stride =
sizeof(glm::vec3);
20 bindingDescriptions[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
22 return std::move(bindingDescriptions);
25 std::vector<VkVertexInputAttributeDescription>
InputAssembly::GetAttributeDescriptions()
29 std::vector<VkVertexInputAttributeDescription> attributeDescriptions(1);
31 attributeDescriptions[0].binding = 0;
32 attributeDescriptions[0].location = 0;
33 attributeDescriptions[0].format = VK_FORMAT_R32G32B32_SFLOAT;
34 attributeDescriptions[0].offset = 0;
36 return std::move(attributeDescriptions);
39 std::vector<VkVertexInputBindingDescription>
InputAssembly::GetSlateBindingDescriptions()
43 std::vector<VkVertexInputBindingDescription> bindingDescriptions(3);
45 bindingDescriptions[0].binding = 0;
46 bindingDescriptions[0].stride =
sizeof(glm::vec2);
47 bindingDescriptions[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
49 bindingDescriptions[1].binding = 1;
50 bindingDescriptions[1].stride =
sizeof(glm::vec2);
51 bindingDescriptions[1].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
53 bindingDescriptions[2].binding = 2;
54 bindingDescriptions[2].stride =
sizeof(
float);
55 bindingDescriptions[2].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
57 return std::move(bindingDescriptions);
60 std::vector<VkVertexInputAttributeDescription>
InputAssembly::GetSlateAttributeDescriptions()
64 std::vector<VkVertexInputAttributeDescription> attributeDescriptions(3);
66 attributeDescriptions[0].binding = 0;
67 attributeDescriptions[0].location = 0;
68 attributeDescriptions[0].format = VK_FORMAT_R32G32_SFLOAT;
69 attributeDescriptions[0].offset = 0;
71 attributeDescriptions[1].binding = 1;
72 attributeDescriptions[1].location = 1;
73 attributeDescriptions[1].format = VK_FORMAT_R32G32_SFLOAT;
74 attributeDescriptions[1].offset = 0;
76 attributeDescriptions[2].binding = 2;
77 attributeDescriptions[2].location = 2;
78 attributeDescriptions[2].format = VK_FORMAT_R8G8B8A8_UNORM;
79 attributeDescriptions[2].offset = 0;
81 return std::move(attributeDescriptions);
89 vertexOffset = m.vertex_offset;
91 nVertices = m.vertex_count;
92 nPrimitives = m.triangle_count;
96 boundSphere.c.x = bounds.center[0];
97 boundSphere.c.y = bounds.center[1];
98 boundSphere.c.z = bounds.center[2];
99 boundSphere.r = bounds.radius;
101 clusterBoundSphere.c = glm::vec3(0.0f);
102 clusterBoundSphere.r = 0.0f;
104 coneApex.x = bounds.cone_apex[0];
105 coneApex.y = bounds.cone_apex[1];
106 coneApex.z = bounds.cone_apex[2];
108 coneAxis.x = bounds.cone_axis[0];
109 coneAxis.y = bounds.cone_axis[1];
110 coneAxis.z = bounds.cone_axis[2];
112 coneCutoff = bounds.cone_cutoff;
#define SPICES_PROFILE_ZONE
void FromMeshopt(const meshopt_Meshlet &m, const meshopt_Bounds &bounds)
Destructor Function. @attemtion Why Destructor causes bug here.
Meshlet Class. This class defines what Meshlet data.