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.
This commit is contained in:
parent
abb5a64919
commit
c422fb7e82
|
@ -1521,7 +1521,7 @@ bool Renderer::CompileShaders()
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
ocol0 = texture(samp0, uv0);
|
ocol0 = float4(texture(samp0, uv0).xyz, 1.0);
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,10 @@ private:
|
||||||
|
|
||||||
// Shaders used for clear/blit.
|
// Shaders used for clear/blit.
|
||||||
VkShaderModule m_clear_fragment_shader = VK_NULL_HANDLE;
|
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;
|
VkShaderModule m_blit_fragment_shader = VK_NULL_HANDLE;
|
||||||
|
|
||||||
// Texture used for screenshot/frame dumping
|
// Texture used for screenshot/frame dumping
|
||||||
|
|
Loading…
Reference in New Issue