summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-10-05 22:02:04 +1000
committerStenzek <stenzek@gmail.com>2016-10-05 22:02:04 +1000
commitc422fb7e82e2ebc89c06aef1d3fbe964657fffb4 (patch)
tree71dc63a1ff5078e99095a01ce77176f8cbba609b /Source/Core/VideoBackends
parentabb5a64919f0425db5f282803eda43b764282482 (diff)
Vulkan: Set alpha channel of swap chain buffers to 1.0.
Copying the alpha channel from the game causes issues with frame dumping, since we're using a buffer directly from the GPU as a source for AVIDump.
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.cpp2
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
index 7bb15aacdf..36be733b39 100644
--- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp
+++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
@@ -1521,7 +1521,7 @@ bool Renderer::CompileShaders()
void main()
{
- ocol0 = texture(samp0, uv0);
+ ocol0 = float4(texture(samp0, uv0).xyz, 1.0);
}
)";
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.h b/Source/Core/VideoBackends/Vulkan/Renderer.h
index 18fa5cc0c4..f292d722a0 100644
--- a/Source/Core/VideoBackends/Vulkan/Renderer.h
+++ b/Source/Core/VideoBackends/Vulkan/Renderer.h
@@ -118,6 +118,10 @@ private:
// Shaders used for clear/blit.
VkShaderModule m_clear_fragment_shader = VK_NULL_HANDLE;
+
+ // NOTE: The blit shader here is used for the final copy from the source buffer(s) to the swap
+ // chain buffer for presentation. It ignores the alpha channel of the input image and sets the
+ // alpha channel to 1.0 to avoid issues with frame dumping and screenshots.
VkShaderModule m_blit_fragment_shader = VK_NULL_HANDLE;
// Texture used for screenshot/frame dumping