Files
minecraft-pt/shaders/Lib/BasicFunctions/VanillaComposite.glsl
T

17 lines
489 B
GLSL

// MinecraftPT — Vanilla Composite helpers
// Sky/cloud colors approximating vanilla for transitions and fog.
#ifndef VANILLA_COMPOSITE_GLSL
#define VANILLA_COMPOSITE_GLSL
vec3 GetVanillaSkyColor(vec3 dir){
vec3 skyColor = vec3(0.6, 0.8, 1.0);
float horizon = exp(-max(dir.y, 0.0) * 3.0);
return mix(skyColor * 0.3, skyColor, 1.0 - horizon);
}
vec3 GetVanillaFogColor(vec3 skyColor, float nightFactor){
return mix(skyColor, skyColor * vec3(0.2, 0.25, 0.4), nightFactor);
}
#endif