Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/DX12/LLGI.PipelineStateDX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ bool PipelineStateDX12::CreatePipelineState()
elementDescs[i].Format = DXGI_FORMAT_R8G8B8A8_UINT;
elementOffset += sizeof(float) * 1;
}
else if (VertexLayouts[i] == VertexLayoutFormat::R16G16_UNORM)
{
elementDescs[i].Format = DXGI_FORMAT_R16G16_UNORM;
elementOffset += sizeof(float) * 1;
}
else
{
Log(LogType::Error, "Unimplemented VertexLoayoutFormat");
Expand Down
1 change: 1 addition & 0 deletions src/LLGI.Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ enum class VertexLayoutFormat
R8G8B8A8_UINT,
R32G32_FLOAT,
R32_FLOAT,
R16G16_UNORM,
};

enum class TopologyType
Expand Down
6 changes: 6 additions & 0 deletions src/Metal/LLGI.PipelineStateMetal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
vertexDescriptor.attributes[i].bufferIndex = VertexBufferIndex;
vertexOffset += sizeof(float);
}
else if (pipstate->VertexLayouts[i] == VertexLayoutFormat::R16G16_UNORM)
{
vertexDescriptor.attributes[i].format = MTLVertexFormatUShort2Normalized;
vertexDescriptor.attributes[i].bufferIndex = VertexBufferIndex;
vertexOffset += sizeof(float);
}
else
{
Log(LogType::Error, "Unimplemented VertexLoayoutFormat");
Expand Down
5 changes: 5 additions & 0 deletions src/Vulkan/LLGI.PipelineStateVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ bool PipelineStateVulkan::CreateGraphicsPipeline()
attribDesc.format = vk::Format::eR8G8B8A8Unorm;
vertexOffset += sizeof(float);
}
else if (VertexLayouts[i] == VertexLayoutFormat::R16G16_UNORM)
{
attribDesc.format = vk::Format::eR16G16Unorm;
vertexOffset += sizeof(float);
}
else
{
Log(LogType::Error, "Unimplemented VertexLoayoutFormat");
Expand Down
Loading