diff --git a/example/src/main.cpp b/example/src/main.cpp index c923326..49ce53e 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -6,6 +6,6 @@ int main(int argc, char* argv[]) { init.size = {800, 600}; init.resizable = true; init.centered = true; - init.api = mirage::renderer_api::opengl; + // init.api = mirage::renderer_api::opengl; return run(init); } diff --git a/scripts/compile_shaders.py b/scripts/compile_shaders.py index c8d3f38..d989c5e 100644 --- a/scripts/compile_shaders.py +++ b/scripts/compile_shaders.py @@ -257,6 +257,25 @@ def generate_pipeline_header_preamble() -> List[str]: " desc.type = type;", " desc.sourceType = is_string_source ? LLGL::ShaderSourceType::CodeString : LLGL::ShaderSourceType::BinaryBuffer;", "", + " if (rendererID == LLGL::RendererID::Direct3D11) {", + " if (type == LLGL::ShaderType::Vertex) {", + " desc.profile = \"vs_5_0\";", + " } else if (type == LLGL::ShaderType::Fragment) {", + " desc.profile = \"ps_5_0\";", + " } else if (type == LLGL::ShaderType::Compute) {", + " desc.profile = \"cs_5_0\";", + " };", + " } else if (rendererID == LLGL::RendererID::Direct3D12) {", + " if (type == LLGL::ShaderType::Vertex) {", + " desc.profile = \"vs_6_6\";", + " } else if (type == LLGL::ShaderType::Fragment) {", + " desc.profile = \"ps_6_6\";", + " } else if (type == LLGL::ShaderType::Compute) {", + " desc.profile = \"cs_6_6\";", + " };", + " } else if (rendererID == LLGL::RendererID::Metal) {", + " desc.profile = \"2.1\";", + " }", " auto shader = renderer->CreateShader(desc);", " if (auto report = shader->GetReport()) {", " spdlog::error(\"Shader compilation report: {}\", report->GetText());",