summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/vert
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/shaders/vert')
-rw-r--r--cwd/assets/altcraft/shaders/vert/entity.vs6
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs6
-rw-r--r--cwd/assets/altcraft/shaders/vert/fbo.vs3
-rw-r--r--cwd/assets/altcraft/shaders/vert/light.vs3
-rw-r--r--cwd/assets/altcraft/shaders/vert/pp.vs3
-rw-r--r--cwd/assets/altcraft/shaders/vert/rml.vs3
-rw-r--r--cwd/assets/altcraft/shaders/vert/sky.vs3
7 files changed, 27 insertions, 0 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/entity.vs b/cwd/assets/altcraft/shaders/vert/entity.vs
index 4acaa93..f90fbc1 100644
--- a/cwd/assets/altcraft/shaders/vert/entity.vs
+++ b/cwd/assets/altcraft/shaders/vert/entity.vs
@@ -2,11 +2,16 @@
in vec3 pos;
+out vec4 entityWorldPos;
+
uniform mat4 model;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
@@ -14,4 +19,5 @@ 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 70c24c8..e50e503 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -8,6 +8,7 @@ in float animation;
in vec3 color;
in vec2 light;
+out vec4 faceWorldPos;
out vec3 faceTextureUv;
out vec3 faceNormal;
out vec3 faceAddColor;
@@ -15,7 +16,10 @@ out vec2 faceLight;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
@@ -24,6 +28,8 @@ 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/fbo.vs b/cwd/assets/altcraft/shaders/vert/fbo.vs
index cfde14e..0e05eaf 100644
--- a/cwd/assets/altcraft/shaders/vert/fbo.vs
+++ b/cwd/assets/altcraft/shaders/vert/fbo.vs
@@ -7,7 +7,10 @@ out vec2 uv;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
diff --git a/cwd/assets/altcraft/shaders/vert/light.vs b/cwd/assets/altcraft/shaders/vert/light.vs
index 4e551f8..118ea5b 100644
--- a/cwd/assets/altcraft/shaders/vert/light.vs
+++ b/cwd/assets/altcraft/shaders/vert/light.vs
@@ -7,7 +7,10 @@ out vec2 uv;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
diff --git a/cwd/assets/altcraft/shaders/vert/pp.vs b/cwd/assets/altcraft/shaders/vert/pp.vs
index 4e551f8..118ea5b 100644
--- a/cwd/assets/altcraft/shaders/vert/pp.vs
+++ b/cwd/assets/altcraft/shaders/vert/pp.vs
@@ -7,7 +7,10 @@ out vec2 uv;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
diff --git a/cwd/assets/altcraft/shaders/vert/rml.vs b/cwd/assets/altcraft/shaders/vert/rml.vs
index ea78825..c61a4a0 100644
--- a/cwd/assets/altcraft/shaders/vert/rml.vs
+++ b/cwd/assets/altcraft/shaders/vert/rml.vs
@@ -11,7 +11,10 @@ uniform vec2 translation;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;
diff --git a/cwd/assets/altcraft/shaders/vert/sky.vs b/cwd/assets/altcraft/shaders/vert/sky.vs
index 617caed..7043584 100644
--- a/cwd/assets/altcraft/shaders/vert/sky.vs
+++ b/cwd/assets/altcraft/shaders/vert/sky.vs
@@ -8,7 +8,10 @@ uniform mat4 model;
layout (std140) uniform Globals {
mat4 projView;
+ mat4 proj;
+ mat4 view;
uvec2 viewportSize;
+ vec4 ssaoKernels[64];
float globalTime;
float dayTime;
float gamma;