diff options
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/header_330.glsl | 2 | ||||
-rw-r--r-- | shaders/header_420.glsl | 5 | ||||
-rw-r--r-- | shaders/rect.frag | 6 | ||||
-rw-r--r-- | shaders/rect.vert | 6 |
4 files changed, 13 insertions, 6 deletions
diff --git a/shaders/header_330.glsl b/shaders/header_330.glsl index 1bcdf05..bfe7a00 100644 --- a/shaders/header_330.glsl +++ b/shaders/header_330.glsl @@ -1,3 +1,5 @@ #version 330 core +#define INTER(qualifiers) #define UBO(qualifiers) layout(std140) + diff --git a/shaders/header_420.glsl b/shaders/header_420.glsl new file mode 100644 index 0000000..55fbe8a --- /dev/null +++ b/shaders/header_420.glsl @@ -0,0 +1,5 @@ +#version 420 core + +#define INTER(qualifiers) layout(qualifiers) +#define UBO(qualifiers) layout(std140, qualifiers) + diff --git a/shaders/rect.frag b/shaders/rect.frag index 8622782..ecec50d 100644 --- a/shaders/rect.frag +++ b/shaders/rect.frag @@ -8,9 +8,9 @@ specified precisely in pixels to draw sharp lines. The border width is just hardcoded, but could be made a uniform or vertex attribute easily enough. */ -noperspective in vec2 f_uv; -noperspective in vec2 f_size; -noperspective in vec4 f_fillColor; +INTER(location = 0) noperspective in vec2 f_uv; +INTER(location = 1) noperspective in vec2 f_size; +INTER(location = 2) noperspective in vec4 f_fillColor; layout(location = 0) out vec4 FragColor; diff --git a/shaders/rect.vert b/shaders/rect.vert index ef8c8cc..09f1917 100644 --- a/shaders/rect.vert +++ b/shaders/rect.vert @@ -11,9 +11,9 @@ layout(location = 1) in vec2 v_origin; layout(location = 2) in vec2 v_size; layout(location = 3) in vec4 v_fillColor; -noperspective out vec2 f_uv; -noperspective out vec2 f_size; -noperspective out vec4 f_fillColor; +INTER(location = 0) noperspective out vec2 f_uv; +INTER(location = 1) noperspective out vec2 f_size; +INTER(location = 2) noperspective out vec4 f_fillColor; void main() |