diff --git a/source/display.cpp b/source/display.cpp index 23a97f0..929d57a 100644 --- a/source/display.cpp +++ b/source/display.cpp @@ -274,7 +274,7 @@ EmuDisplay::EmuDisplay(spdlog::logger& logger, vk::PhysicalDevice physical_devic "\n" "void main() {\n" // NOTE: Alpha channel is set to 1.0 here because the Qt frontend requires this for overlay effects (blur, ...) to work - " out_color = vec4(texture(sampler0, -gl_FragCoord.yx * vec2(" + std::to_string(1.0 / height) + ", " + std::to_string(1.0 / width) + ")).rgb, 1.0);\n" + " out_color = vec4(texture(sampler0, -gl_FragCoord.yx * vec2(" + fmt::format("{}", 1.0 / height) + ", " + fmt::format("{}", 1.0 / width) + ")).rgb, 1.0);\n" "}\n"; auto shader_spv = CompileShader(EShLangFragment, code.c_str(), "main"); diff --git a/source/video_core/src/video_core/shader_microcode.cpp b/source/video_core/src/video_core/shader_microcode.cpp index 257d270..8eec642 100644 --- a/source/video_core/src/video_core/shader_microcode.cpp +++ b/source/video_core/src/video_core/shader_microcode.cpp @@ -1485,7 +1485,7 @@ uvec4 i[4]; glsl += "vec4 non_ieee_mul(vec4 a, vec4 b) { return vec4(non_ieee_mul(a.x, b.x), non_ieee_mul(a.y, b.y), non_ieee_mul(a.z, b.z), non_ieee_mul(a.w, b.w)); } \n\n"; } else { // Fallback: convert INF to FLT32_MAX before multiplication - auto max_float = std::to_string(std::numeric_limits::max()); + auto max_float = fmt::format("{}", std::numeric_limits::max()); glsl += "float non_ieee_mul(float a, float b) { return min(a, " + max_float + ") * min(b, " + max_float + "); } \n\n"; glsl += "vec2 non_ieee_mul(vec2 a, vec2 b) { return min(a, vec2(" + max_float + ")) * min(b, vec2(" + max_float + ")); } \n\n"; glsl += "vec3 non_ieee_mul(vec3 a, vec3 b) { return min(a, vec3(" + max_float + ")) * min(b, vec3(" + max_float + ")); } \n\n";