VulkanRenderer: Some fixes

This commit is contained in:
Jérôme Leclercq 2021-09-05 15:49:36 +02:00
parent 3af1cd80ee
commit a18d505ae2
2 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,7 @@ namespace Nz
{
switch (componentType)
{
case ComponentType::Color: return VK_FORMAT_R8G8B8A8_UINT;
case ComponentType::Color: return VK_FORMAT_R8G8B8A8_UNORM;
case ComponentType::Double1: return VK_FORMAT_R64_SFLOAT;
case ComponentType::Double2: return VK_FORMAT_R64G64_SFLOAT;
case ComponentType::Double3: return VK_FORMAT_R64G64B64_SFLOAT;

View File

@ -218,6 +218,9 @@ namespace Nz
for (const auto& componentInfo : bufferData.declaration->GetComponents())
{
if (componentInfo.component == VertexComponent::Unused)
continue;
auto& bufferAttribute = vertexAttributes.emplace_back();
bufferAttribute.binding = binding;
bufferAttribute.location = locationIndex++;