summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/vert
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-12-11 16:44:40 +0100
committerLaG1924 <lag1924@gmail.com>2021-12-11 16:44:40 +0100
commitbe808181b2c84358b232e4a32d1a6dd9dd6659ed (patch)
tree5a0089532532a52fc307d836e2b1e90eced06779 /cwd/assets/altcraft/shaders/vert
parentRemoved unnecessary framebuffers copying (diff)
downloadAltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.gz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.bz2
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.lz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.xz
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.tar.zst
AltCraft-be808181b2c84358b232e4a32d1a6dd9dd6659ed.zip
Diffstat (limited to 'cwd/assets/altcraft/shaders/vert')
-rw-r--r--cwd/assets/altcraft/shaders/vert/entity.vs4
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs4
-rw-r--r--cwd/assets/altcraft/shaders/vert/light.vs22
-rw-r--r--cwd/assets/altcraft/shaders/vert/quad.vs1
-rw-r--r--cwd/assets/altcraft/shaders/vert/rml.vs1
-rw-r--r--cwd/assets/altcraft/shaders/vert/sky.vs1
6 files changed, 5 insertions, 28 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/entity.vs b/cwd/assets/altcraft/shaders/vert/entity.vs
index f90fbc1..8cc7f69 100644
--- a/cwd/assets/altcraft/shaders/vert/entity.vs
+++ b/cwd/assets/altcraft/shaders/vert/entity.vs
@@ -2,13 +2,12 @@
in vec3 pos;
-out vec4 entityWorldPos;
-
uniform mat4 model;
layout (std140) uniform Globals {
mat4 projView;
mat4 proj;
+ mat4 invProj;
mat4 view;
uvec2 viewportSize;
vec4 ssaoKernels[64];
@@ -19,5 +18,4 @@ layout (std140) uniform Globals {
void main() {
gl_Position = projView * model * vec4(pos, 1);
- entityWorldPos = view * model * vec4(pos, 1.0f);
}
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs
index a85b2c6..3e6adf7 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -8,7 +8,6 @@ in float animation;
in vec3 color;
in vec2 light;
-out vec4 faceWorldPos;
out vec3 faceTextureUv;
out vec3 faceNormal;
out vec3 faceAddColor;
@@ -17,6 +16,7 @@ out vec2 faceLight;
layout (std140) uniform Globals {
mat4 projView;
mat4 proj;
+ mat4 invProj;
mat4 view;
uvec2 viewportSize;
vec4 ssaoKernels[64];
@@ -28,8 +28,6 @@ layout (std140) uniform Globals {
void main() {
gl_Position = projView * vec4(pos[gl_VertexID], 1.0f);
- faceWorldPos = view * vec4(pos[gl_VertexID], 1.0f);
-
faceTextureUv = vec3(uv[gl_VertexID], uvLayer);
faceTextureUv.y -= (uv[2].y - uv[0].y) * trunc(mod(globalTime * 4.0f, animation));
diff --git a/cwd/assets/altcraft/shaders/vert/light.vs b/cwd/assets/altcraft/shaders/vert/light.vs
deleted file mode 100644
index 118ea5b..0000000
--- a/cwd/assets/altcraft/shaders/vert/light.vs
+++ /dev/null
@@ -1,22 +0,0 @@
-#version 330 core
-
-in vec2 pos;
-in vec2 uvPos;
-
-out vec2 uv;
-
-layout (std140) uniform Globals {
- mat4 projView;
- mat4 proj;
- mat4 view;
- uvec2 viewportSize;
- vec4 ssaoKernels[64];
- float globalTime;
- float dayTime;
- float gamma;
-};
-
-void main() {
- gl_Position = vec4(pos.x, pos.y, 0.0, 1.0);
- uv = uvPos;
-}
diff --git a/cwd/assets/altcraft/shaders/vert/quad.vs b/cwd/assets/altcraft/shaders/vert/quad.vs
index 118ea5b..9add76d 100644
--- a/cwd/assets/altcraft/shaders/vert/quad.vs
+++ b/cwd/assets/altcraft/shaders/vert/quad.vs
@@ -8,6 +8,7 @@ out vec2 uv;
layout (std140) uniform Globals {
mat4 projView;
mat4 proj;
+ mat4 invProj;
mat4 view;
uvec2 viewportSize;
vec4 ssaoKernels[64];
diff --git a/cwd/assets/altcraft/shaders/vert/rml.vs b/cwd/assets/altcraft/shaders/vert/rml.vs
index c61a4a0..897f49d 100644
--- a/cwd/assets/altcraft/shaders/vert/rml.vs
+++ b/cwd/assets/altcraft/shaders/vert/rml.vs
@@ -12,6 +12,7 @@ uniform vec2 translation;
layout (std140) uniform Globals {
mat4 projView;
mat4 proj;
+ mat4 invProj;
mat4 view;
uvec2 viewportSize;
vec4 ssaoKernels[64];
diff --git a/cwd/assets/altcraft/shaders/vert/sky.vs b/cwd/assets/altcraft/shaders/vert/sky.vs
index 7043584..c618852 100644
--- a/cwd/assets/altcraft/shaders/vert/sky.vs
+++ b/cwd/assets/altcraft/shaders/vert/sky.vs
@@ -9,6 +9,7 @@ uniform mat4 model;
layout (std140) uniform Globals {
mat4 projView;
mat4 proj;
+ mat4 invProj;
mat4 view;
uvec2 viewportSize;
vec4 ssaoKernels[64];