mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Get rid of array in present vertex shader
This commit is contained in:
parent
42e61020e4
commit
770ec2c4db
@ -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);
|
||||
|
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user