diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2021-06-22 02:38:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 02:38:30 +0200 |
commit | ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd (patch) | |
tree | 33d7d2673ba0da8a92323b07d061f655c719ae40 /cwd/assets/altcraft/shaders/frag | |
parent | Merge pull request #44 from LaG1924/fix/protocol_support (diff) | |
parent | Updated build instructions and added MacOS #49 (diff) | |
download | AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar.gz AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar.bz2 AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar.lz AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar.xz AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.tar.zst AltCraft-ca7bcf9f7dc5eb47ccbec1049b323f0604dabadd.zip |
Diffstat (limited to 'cwd/assets/altcraft/shaders/frag')
-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 |