diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-09 03:45:01 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-09 03:45:01 +0200 |
commit | 8284658bac04837756287d2f6b36485c8a2833dc (patch) | |
tree | 38c2ee0bae55ed323cc7fd501acd8baea1dfc6f7 /src/video_core | |
parent | configure_audio: Use u8 for volume value (diff) | |
download | yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar.gz yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar.bz2 yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar.lz yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar.xz yuzu-8284658bac04837756287d2f6b36485c8a2833dc.tar.zst yuzu-8284658bac04837756287d2f6b36485c8a2833dc.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 8 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index a718bff7a..c12929de6 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -229,9 +229,6 @@ void RendererOpenGL::LoadColorToActiveGLTexture(u8 color_r, u8 color_g, u8 color } void RendererOpenGL::InitOpenGLObjects() { - glClearColor(Settings::values.bg_red.GetValue(), Settings::values.bg_green.GetValue(), - Settings::values.bg_blue.GetValue(), 0.0f); - // Create shader programs OGLShader vertex_shader; vertex_shader.Create(HostShaders::OPENGL_PRESENT_VERT, GL_VERTEX_SHADER); @@ -337,8 +334,9 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture, void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) { if (renderer_settings.set_background_color) { // Update background color before drawing - glClearColor(Settings::values.bg_red.GetValue(), Settings::values.bg_green.GetValue(), - Settings::values.bg_blue.GetValue(), 0.0f); + glClearColor(Settings::values.bg_red.GetValue() / 255.0f, + Settings::values.bg_green.GetValue() / 255.0f, + Settings::values.bg_blue.GetValue() / 255.0f, 1.0f); } // Set projection matrix diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index a1a32aabe..363134129 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -225,8 +225,11 @@ VkSemaphore VKBlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, bool descriptor_set = descriptor_sets[image_index], buffer = *buffer, size = swapchain.GetSize(), pipeline = *pipeline, layout = *pipeline_layout](vk::CommandBuffer cmdbuf) { + const f32 bg_red = Settings::values.bg_red.GetValue() / 255.0f; + const f32 bg_green = Settings::values.bg_green.GetValue() / 255.0f; + const f32 bg_blue = Settings::values.bg_blue.GetValue() / 255.0f; const VkClearValue clear_color{ - .color = {.float32 = {0.0f, 0.0f, 0.0f, 0.0f}}, + .color = {.float32 = {bg_red, bg_green, bg_blue, 1.0f}}, }; const VkRenderPassBeginInfo renderpass_bi{ .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, |