[dxvk] Get rid of array in present vertex shader

This commit is contained in:
Philip Rebohle 2019-06-29 01:34:16 +02:00
parent 42e61020e4
commit 770ec2c4db
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 7 additions and 11 deletions

View File

@ -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);

View File

@ -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);
}