This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
LEFTONE/core/loshader/cinescope.vshader
falsycat 84c3a02b9a [RELEASE] u22-v03
This version is submitted to U22 breau.
2020-09-14 00:00:00 +00:00

23 lines
424 B
GLSL

layout(std140) uniform param {
vec4 color;
float size;
} p;
const vec2[6] rect_ = vec2[](
vec2(-1., 1.),
vec2(-1., 0.),
vec2( 1., 0.),
vec2(-1., 1.),
vec2( 1., 0.),
vec2( 1., 1.)
);
void main(void) {
int id = gl_VertexID < 6? gl_VertexID: gl_VertexID-6;
vec2 p = rect_[id]*vec2(1., p.size) + vec2(0., 1.-p.size);
p.y *= (id == gl_VertexID? 1.: -1.);
gl_Position = vec4(p, 0., 1.);
}