summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/frag/sky.fs
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/shaders/frag/sky.fs')
-rw-r--r--cwd/assets/altcraft/shaders/frag/sky.fs10
1 files changed, 8 insertions, 2 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/sky.fs b/cwd/assets/altcraft/shaders/frag/sky.fs
index 3763bdb..32b7da0 100644
--- a/cwd/assets/altcraft/shaders/frag/sky.fs
+++ b/cwd/assets/altcraft/shaders/frag/sky.fs
@@ -7,8 +7,14 @@ layout (location = 1) out vec4 normal;
layout (location = 2) out vec4 addColor;
layout (location = 3) out vec4 light;
+layout (std140) uniform Globals {
+ mat4 projView;
+ uvec2 viewportSize;
+ float globalTime;
+ float dayTime;
+};
+
uniform sampler2DArray textureAtlas;
-uniform float DayTime;
uniform vec4 sunTexture;
uniform float sunTextureLayer;
uniform vec4 moonTexture;
@@ -49,7 +55,7 @@ vec4 Moon() {
void main() {
vec4 starColor = vec4(0.0f, 0.04f, 0.06f, 1.0f);
- color = vec4(mix(starColor, DaySkyColor, DayTime).rgb, 1.0f);
+ color = vec4(mix(starColor, DaySkyColor, dayTime).rgb, 1.0f);
color += vec4(Sun().rgb, 1.0f);
color += vec4(Moon().rgb, 1.0f);
normal = vec4(0.0f, 0.0f, 0.0f, 1.0f);