mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
removed the "cloud cradle" on the horizon. added fake rayleigh scattering for distant clouds. fixed issue where ambient SSS didnt adjust with ambient brightness. added some requested lights to .properties files. added a "original chocapic sky" misc option. removed stonger sunlight sky absorbtion. tweaked border fog and made it on by default
This commit is contained in:
@ -963,7 +963,7 @@ void main() {
|
||||
SkySSS = ScreenSpace_SSS(viewPos, FlatNormals, hand, isLeaf, noise);
|
||||
#endif
|
||||
|
||||
vec3 ambientColor = averageSkyCol_Clouds / 12.0; // divide by 12 to match the brightest part of ambient light facing up
|
||||
vec3 ambientColor = (averageSkyCol_Clouds / 12.0) * ambient_brightness; // divide by 12 to match the brightest part of ambient light facing up
|
||||
float skylightmap = pow(lightmap.y,3);
|
||||
|
||||
Indirect_SSS = SubsurfaceScattering_sky(albedo, SkySSS, LabSSS);
|
||||
|
@ -48,6 +48,7 @@ uniform vec3 previousCameraPosition;
|
||||
|
||||
uniform int isEyeInWater;
|
||||
uniform ivec2 eyeBrightnessSmooth;
|
||||
uniform ivec2 eyeBrightness;
|
||||
uniform float rainStrength;
|
||||
uniform float blindness;
|
||||
uniform float darknessFactor;
|
||||
@ -211,6 +212,7 @@ void main() {
|
||||
float linearDistance = length(p3);
|
||||
|
||||
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||
float lightleakfixfast = clamp(eyeBrightness.y/240.,0.0,1.0);
|
||||
|
||||
////// --------------- UNPACK TRANSLUCENT GBUFFERS --------------- //////
|
||||
vec3 data = texture2D(colortex11,texcoord).rgb;
|
||||
@ -250,6 +252,8 @@ void main() {
|
||||
float fog = exp(-50.0 * pow(clamp(1.0-linearDistance/far,0.0,1.0),2.0));
|
||||
fog *= exp(-10.0 * pow(clamp(np3.y,0.0,1.0)*4.0,2.0));
|
||||
if(z >= 1.0 || isEyeInWater != 0) fog = 0.0;
|
||||
|
||||
if(lightleakfixfast < 1.0) fog *= lightleakfix;
|
||||
|
||||
color.rgb = mix(color.rgb, skyGroundColor, fog);
|
||||
#endif
|
||||
|
@ -112,7 +112,7 @@ void main() {
|
||||
// only need to sample one spot for this
|
||||
vec3 minimumlight = vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.003 + nightVision);
|
||||
averageSkyCol_Clouds = max(averageSkyCol_Clouds, minimumlight);
|
||||
averageSkyCol = max(averageSkyCol, minimumlight);
|
||||
averageSkyCol = max(averageSkyCol*PLANET_GROUND_BRIGHTNESS, minimumlight);
|
||||
|
||||
////////////////////////////////////////
|
||||
/// --- SUNLIGHT/MOONLIGHT STUFF --- ///
|
||||
@ -125,9 +125,8 @@ void main() {
|
||||
|
||||
vec3 skyAbsorb = vec3(0.0);
|
||||
sunColor = calculateAtmosphere(vec3(0.0), sunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,0.0);
|
||||
sunColor = sunColorBase/4000. * (skyAbsorb*skyAbsorb);
|
||||
// skyAbsorb = vec3(1.0);
|
||||
// moonColor = calculateAtmosphere(vec3(0.0), -sunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,0.5);
|
||||
sunColor = sunColorBase/4000. * skyAbsorb;
|
||||
|
||||
moonColor = moonColorBase/4000.0;
|
||||
|
||||
lightSourceColor = sunVis >= 1e-5 ? sunColor * sunVis : moonColor * moonVis;
|
||||
|
Reference in New Issue
Block a user