2019-03-28 04:53:15 +00:00
|
|
|
#version 300 es
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 vertexPosition_modelspace;
|
|
|
|
layout(location = 1) in vec2 vertexUV;
|
|
|
|
|
2019-05-23 09:58:12 +00:00
|
|
|
uniform vec2 screen;
|
|
|
|
uniform ivec2 size;
|
|
|
|
uniform vec4 color;
|
2019-03-28 04:53:15 +00:00
|
|
|
|
|
|
|
out highp vec2 uv;
|
2019-05-23 09:58:12 +00:00
|
|
|
out highp vec2 sz;
|
2019-03-28 04:53:15 +00:00
|
|
|
out highp vec4 c;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2019-05-23 09:58:12 +00:00
|
|
|
sz = vec2(size) + 0.5;
|
|
|
|
|
2019-03-28 04:53:15 +00:00
|
|
|
gl_Position.xyz = vertexPosition_modelspace;
|
|
|
|
gl_Position.w = 1.0;
|
2019-05-23 09:58:12 +00:00
|
|
|
gl_Position.xy *= screen.xy * sz;
|
2019-03-28 04:53:15 +00:00
|
|
|
|
|
|
|
uv = vertexUV;
|
|
|
|
c = color;
|
|
|
|
}
|