Skip to content

Commit

Permalink
[Shader] Added support for DX11/12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Oct 29, 2023
1 parent caaba12 commit 9ecc4ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/client/graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void Shader::loadFromFile(const std::string &name) {
suffix = "120";
else if (bgfx::getRendererType() == bgfx::RendererType::Vulkan)
suffix = "spirv";
else if (bgfx::getRendererType() == bgfx::RendererType::Direct3D11
|| bgfx::getRendererType() == bgfx::RendererType::Direct3D12)
suffix = "s_5_0";

m_vertexShader = loadShader("resources/shaders/" + name + "." + suffix + ".vs.bin");
m_fragmentShader = loadShader("resources/shaders/" + name + "." + suffix + ".fs.bin");
Expand Down

0 comments on commit 9ecc4ec

Please sign in to comment.