mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-02-03 05:01:00 +00:00
Prepare the vertex shader to draw without a vertex buffer
This commit is contained in:
parent
8ec576c3bd
commit
71c6552258
1 changed files with 8 additions and 1 deletions
|
@ -20,10 +20,17 @@ layout(push_constant) uniform PushConstants
|
|||
|
||||
layout(location = 0) out vec3 worldpos;
|
||||
|
||||
vec2 positions[4] = vec2[](
|
||||
vec2(0.0, 0.0),
|
||||
vec2(0.0, 1.0),
|
||||
vec2(1.0, 1.0),
|
||||
vec2(1.0, 0.0)
|
||||
);
|
||||
|
||||
void main()
|
||||
{
|
||||
worldpos = vec3(0.0);
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position = vec4(positions[gl_VertexIndex] * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
)glsl";
|
||||
|
|
Loading…
Reference in a new issue