diff options
author | LaG1924 <lag1924@gmail.com> | 2021-06-07 15:15:32 +0200 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-06-07 15:15:32 +0200 |
commit | f5f62026bf0ce0464811464b16689f9d3aa4abdd (patch) | |
tree | 5901c29ff3833fe12077e6e545a77d05113d9ead /cwd/assets/altcraft | |
parent | Fix Travis-CI build error (diff) | |
download | AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar.gz AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar.bz2 AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar.lz AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar.xz AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.tar.zst AltCraft-f5f62026bf0ce0464811464b16689f9d3aa4abdd.zip |
Diffstat (limited to 'cwd/assets/altcraft')
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/entity.fs | 3 | ||||
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/face.fs | 4 | ||||
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/sky.fs | 8 |
3 files changed, 10 insertions, 5 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/entity.fs b/cwd/assets/altcraft/shaders/frag/entity.fs index f0bb42f..6a11c96 100644 --- a/cwd/assets/altcraft/shaders/frag/entity.fs +++ b/cwd/assets/altcraft/shaders/frag/entity.fs @@ -2,8 +2,9 @@ uniform vec3 color; in vec2 uvPos; +out vec4 fragColor; void main(){ //if (uvPos.x < 0.9 && uvPos.x > 0.1 && uvPos.y < 0.9 && uvPos.y > 0.1) discard; - gl_FragColor = vec4(color,1); + fragColor = vec4(color,1); }
\ No newline at end of file diff --git a/cwd/assets/altcraft/shaders/frag/face.fs b/cwd/assets/altcraft/shaders/frag/face.fs index 98b389a..bd2a2d7 100644 --- a/cwd/assets/altcraft/shaders/frag/face.fs +++ b/cwd/assets/altcraft/shaders/frag/face.fs @@ -7,6 +7,8 @@ in VS_OUT { vec2 Light; } fs_in; +out vec4 fragColor; + uniform sampler2DArray textureAtlas; uniform float DayTime; uniform float MinLightLevel; @@ -44,5 +46,5 @@ void main() { float faceLight = clamp(light + skyLight,MinLightLevel,1.0); color = vec4(color.rgb * faceLight, color.a); - gl_FragColor = color; + fragColor = color; }
\ No newline at end of file diff --git a/cwd/assets/altcraft/shaders/frag/sky.fs b/cwd/assets/altcraft/shaders/frag/sky.fs index 36d65a5..2f51267 100644 --- a/cwd/assets/altcraft/shaders/frag/sky.fs +++ b/cwd/assets/altcraft/shaders/frag/sky.fs @@ -3,6 +3,8 @@ in vec2 uvPos; in vec3 pos; +out vec4 fragColor; + uniform sampler2DArray textureAtlas; uniform float DayTime; uniform vec4 sunTexture; @@ -45,7 +47,7 @@ vec4 Moon() { void main() { vec4 starColor = vec4(0.0f, 0.04f, 0.06f, 1.0f); - gl_FragColor = mix(starColor, DaySkyColor, DayTime); - gl_FragColor += Sun(); - gl_FragColor += Moon(); + fragColor = mix(starColor, DaySkyColor, DayTime); + fragColor += Sun(); + fragColor += Moon(); }
\ No newline at end of file |