mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-18 13:19:19 +01:00
23 lines
486 B
GLSL
23 lines
486 B
GLSL
|
#version 460
|
||
|
|
||
|
layout (location = 0) out vec2 dstPosition;
|
||
|
|
||
|
layout (push_constant) uniform constants {
|
||
|
vec2 dstOriginClipSpace;
|
||
|
vec2 dstDimensionsClipSpace;
|
||
|
} PC;
|
||
|
|
||
|
void main() {
|
||
|
const vec2 lut[6] = vec2[6](
|
||
|
vec2(1, 0),
|
||
|
vec2(1, 1),
|
||
|
vec2(0, 1),
|
||
|
vec2(0, 1),
|
||
|
vec2(0, 0),
|
||
|
vec2(1, 0)
|
||
|
);
|
||
|
|
||
|
dstPosition = lut[gl_VertexIndex];
|
||
|
gl_Position = vec4(PC.dstOriginClipSpace + PC.dstDimensionsClipSpace * lut[gl_VertexIndex], 0, 1);
|
||
|
}
|