65 lines
718 B
Plaintext
65 lines
718 B
Plaintext
|
|
#version 460
|
||
|
|
|
||
|
|
layout ( packed, binding = 0 ) uniform events
|
||
|
|
{
|
||
|
|
|
||
|
|
vec2 mouse;
|
||
|
|
|
||
|
|
vec2 window;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
layout ( packed, binding = 1 ) uniform orientation
|
||
|
|
{
|
||
|
|
|
||
|
|
vec2 quadPosition;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
struct quad{
|
||
|
|
|
||
|
|
vec2 position;
|
||
|
|
|
||
|
|
vec2 size;
|
||
|
|
|
||
|
|
vec3 color;
|
||
|
|
|
||
|
|
int textureIndex;
|
||
|
|
|
||
|
|
//int characters[];
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
layout( std430, binding = 2 ) readonly buffer meshes
|
||
|
|
{
|
||
|
|
|
||
|
|
quad meshArray[1000];
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
layout(location = 0) in vec3 position;
|
||
|
|
|
||
|
|
layout(location = 1) in vec2 textureCoordinates;
|
||
|
|
|
||
|
|
layout(location = 2) in int meshIndex;
|
||
|
|
|
||
|
|
|
||
|
|
out vec2 vertex_textureCoordinates;
|
||
|
|
|
||
|
|
out float vertex_meshIndex;
|
||
|
|
|
||
|
|
out vec3 vertex_color;
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
|
||
|
|
gl_Position.xyz = position;
|
||
|
|
|
||
|
|
vertex_textureCoordinates = textureCoordinates;
|
||
|
|
|
||
|
|
gl_Position.w = 1.0;
|
||
|
|
|
||
|
|
}
|
||
|
|
|