mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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::Image, m_swapImageView, nullptr);
|
||||||
m_context->bindResourceView(BindingIds::Gamma, m_gammaTextureView, 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)
|
if (m_hud != nullptr)
|
||||||
m_hud->render(m_context, info.imageExtent);
|
m_hud->render(m_context, info.imageExtent);
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
#version 450
|
#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;
|
layout(location = 0) out vec2 o_texcoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 pos = g_vpos[gl_VertexIndex];
|
vec2 coord = vec2(
|
||||||
o_texcoord = 0.5f + 0.5f * pos.xy;
|
float(gl_VertexIndex & 2),
|
||||||
gl_Position = pos;
|
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