mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
* refactor(gameplay): remove unused includes and members, clear vertex data after upload * feat(shader-tools): add recursive #include support for shader sources * refactor(shaders): extract noise and sky color functions into shared GLSL includes
30 lines
429 B
GLSL
30 lines
429 B
GLSL
#version 460
|
|
|
|
in vec3 dir;
|
|
|
|
out vec4 frag_color;
|
|
|
|
|
|
uniform vec3 skyTop;
|
|
uniform vec3 skyBottom;
|
|
|
|
uniform vec3 sunDir;
|
|
uniform vec3 sunColor;
|
|
|
|
uniform float horizonSharpness;
|
|
uniform float cloudWhiteMix;
|
|
|
|
uniform float cloudThresholdLow;
|
|
uniform float cloudThresholdHigh;
|
|
|
|
uniform float time;
|
|
|
|
#include "compute_sky_color.glsl"
|
|
|
|
void main(void) {
|
|
|
|
vec3 sky = computeSkyColor(dir);
|
|
|
|
frag_color = vec4(sky, 1.0);
|
|
|
|
} |