summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/vert/rml.vs
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/shaders/vert/rml.vs')
-rw-r--r--cwd/assets/altcraft/shaders/vert/rml.vs32
1 files changed, 20 insertions, 12 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/rml.vs b/cwd/assets/altcraft/shaders/vert/rml.vs
index bdd3b71..897f49d 100644
--- a/cwd/assets/altcraft/shaders/vert/rml.vs
+++ b/cwd/assets/altcraft/shaders/vert/rml.vs
@@ -1,22 +1,30 @@
#version 330 core
-uniform uvec2 viewportSize;
-uniform vec2 translation;
-uniform mat4 rotationMat;
+in vec2 pos;
+in uvec4 col;
+in vec2 uvPos;
+
+out vec4 color;
+out vec2 uv;
-layout (location = 0) in vec2 pos;
-layout (location = 1) in uvec4 color;
-layout (location = 2) in vec2 tex_coord;
+uniform vec2 translation;
-out VS_OUT {
- vec4 color;
- vec2 tex_coord;
-} vs_out;
+layout (std140) uniform Globals {
+ mat4 projView;
+ mat4 proj;
+ mat4 invProj;
+ mat4 view;
+ uvec2 viewportSize;
+ vec4 ssaoKernels[64];
+ float globalTime;
+ float dayTime;
+ float gamma;
+};
void main() {
float x = ((pos.x + translation.x) / viewportSize.x) * 2.0f - 1.0f;
float y = ((pos.y + translation.y) / viewportSize.y) * 2.0f - 1.0f;
gl_Position = vec4(x, -y, -1.0f, 1.0f);
- vs_out.color = vec4(float(color.x) / 255.0f, float(color.y) / 255.0f, float(color.z) / 255.0f, float(color.w) / 255.0f);
- vs_out.tex_coord = tex_coord;
+ color = vec4(float(col.x) / 255.0f, float(col.y) / 255.0f, float(col.z) / 255.0f, float(col.w) / 255.0f);
+ uv = uvPos;
}