diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index 29985424..bffb8210 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -290,7 +290,7 @@ namespace dxvk { m_context->bindResourceView(BindingIds::Image, m_swapImageView, nullptr); m_context->bindResourceView(BindingIds::Gamma, m_gammaTextureView, nullptr); - m_context->draw(4, 1, 0, 0); + m_context->draw(3, 1, 0, 0); if (m_hud != nullptr) m_hud->render(m_context, info.imageExtent); diff --git a/src/dxgi/shaders/dxgi_presenter_vert.vert b/src/dxgi/shaders/dxgi_presenter_vert.vert index 98b6b325..1a9cde1d 100644 --- a/src/dxgi/shaders/dxgi_presenter_vert.vert +++ b/src/dxgi/shaders/dxgi_presenter_vert.vert @@ -1,16 +1,12 @@ #version 450 -const vec4 g_vpos[4] = { - vec4(-1.0f, -1.0f, 0.0f, 1.0f), - vec4(-1.0f, 1.0f, 0.0f, 1.0f), - vec4( 1.0f, -1.0f, 0.0f, 1.0f), - vec4( 1.0f, 1.0f, 0.0f, 1.0f), -}; - layout(location = 0) out vec2 o_texcoord; void main() { - vec4 pos = g_vpos[gl_VertexIndex]; - o_texcoord = 0.5f + 0.5f * pos.xy; - gl_Position = pos; + vec2 coord = vec2( + float(gl_VertexIndex & 2), + float(gl_VertexIndex & 1) * 2.0f); + + o_texcoord = coord; + gl_Position = vec4(-1.0f + 2.0f * coord, 0.0f, 1.0f); } \ No newline at end of file