add moonphases that alter the brightness of night. tweak torch and sky lightmap curves a bit

This commit is contained in:
Xonk 2023-06-19 23:32:39 -04:00
parent 7eb49cd12c
commit cb404760be
10 changed files with 79 additions and 38 deletions

View File

@ -140,6 +140,8 @@ vec3 viewToWorld(vec3 viewPosition) {
pos = gbufferModelViewInverse * pos;
return pos.xyz;
}
#include "lib/res_params.glsl"
#include "lib/Shadow_Params.glsl"
#include "lib/color_transforms.glsl"
@ -704,7 +706,31 @@ void LabEmission(
if( Emission < 255.0/255.0 ) Lighting += (Albedo * Emissive_Brightness) * pow(Emission, Emissive_Curve);
}
vec3 Moon(vec3 PlayerPos, vec3 WorldSunVec, vec3 Color, inout vec3 occludeStars){
float Shape = clamp((exp(1 + -1000 * dot(WorldSunVec+PlayerPos,PlayerPos)) - 1.5),0.0,25.0);
occludeStars *= max(1.0-Shape*5,0.0);
float shape2 = pow(exp(Shape * -10),0.15) * 255.0;
vec3 sunNormal = vec3(dot(WorldSunVec+PlayerPos, vec3(shape2,0,0)), dot(PlayerPos+WorldSunVec, vec3(0,shape2,0)), -dot(WorldSunVec, PlayerPos) * 15.0);
// even has a little tilt approximation haha.... yeah....
vec3[8] phase = vec3[8](vec3( -1.0, -0.5, 1.0 ),
vec3( -1.0, -0.5, 0.35 ),
vec3( -1.0, -0.5, 0.2 ),
vec3( -1.0, -0.5, 0.1 ),
vec3( 1.0, 0.25, -1.0 ),
vec3( 1.0, 0.25, 0.1 ),
vec3( 1.0, 0.25, 0.2 ),
vec3( 1.0, 0.25, 0.35 )
);
vec3 LightDir = phase[moonPhase];
return Shape * pow(clamp(dot(sunNormal,LightDir)/5,0.0,1.5),5) * Color + clamp(Shape * 4.0 * pow(shape2/200,2.0),0.0,1.0)*0.004;
}
@ -814,6 +840,7 @@ void main() {
vec3 DirectLightColor = (lightCol.rgb/80.0);
DirectLightColor *= clamp(abs(WsunVec.y)*2,0.,1.);
vec3 AmbientLightColor = avgAmbient;
@ -832,7 +859,8 @@ void main() {
#ifndef ambientLight_only
background += drawSun(dot(lightCol.a * WsunVec, np3),0, DirectLightColor,vec3(0.0)) ; // sun
background += drawSun(dot(lightCol.a * -WsunVec, np3),0, blackbody2(Moon_temp)/500.,vec3(0.0)); // moon
// vec3 moon = drawSun(dot(lightCol.a * -WsunVec, np3),0, DirectLightColor/5,vec3(0.0)) ; // moon
background += Moon(np3, -WsunVec, DirectLightColor*25, background); // moon
#endif
background *= clamp( (np3.y+ 0.02)*5.0 + (eyeAltitude - 319)/800000 ,0.0,1.0);
@ -846,7 +874,6 @@ void main() {
vec4 cloud = texture2D_bicubic(colortex0,texcoord*CLOUDS_QUALITY);
background = background*cloud.a + cloud.rgb;
gl_FragData[0].rgb = clamp(fp10Dither(background ,triangularize(noise)),0.0,65000.);
#endif
}else{//land

View File

@ -243,6 +243,7 @@ void main() {
#endif
vec4 vl = BilateralUpscale(colortex0, depthtex1, gl_FragCoord.xy, frDepth, vec2(0.0));
color *= vl.a;
if (TranslucentShader.a > 0.0){
#ifdef Glass_Tint
@ -256,16 +257,13 @@ void main() {
#endif
}
//cave fog
//cave fog
#ifdef Cave_fog
if (isEyeInWater == 0){
float fogdistfade = 1.0 - clamp( exp(-pow(length(fragpos / far),2.)*5.0) ,0.0,1.0);
float fogfade = clamp( exp(clamp( np3.y*0.5 +0.5,0,1) * -6.0) ,0.0,1.0);
color.rgb = mix(color.rgb, vec3(CaveFogColor_R,CaveFogColor_G,CaveFogColor_B)*fogfade, fogdistfade * (1.0-lightleakfix) * (1.0-darknessFactor)* clamp( 1.5 - np3.y,0.,1)) ;
float fogdistfade = clamp( pow(length(fragpos) / far, CaveFogFallOff) ,0.0,1.0);
float fogfade = clamp( exp(clamp(np3.y * 0.5 + 0.5,0,1) * -3.0) ,0.0,1.0);
color.rgb = mix(color.rgb, vec3(CaveFogColor_R,CaveFogColor_G,CaveFogColor_B)*fogfade + (blueNoise()-0.5)*0.01, fogdistfade * (1.0-lightleakfix) * (1.0-darknessFactor) * clamp( 1.5 - np3.y,0.,1)) ;
// color.rgb = vec3(CaveFogColor_R,CaveFogColor_G,CaveFogColor_B)*fogfade ;
}
#endif
@ -276,16 +274,13 @@ void main() {
vl.a *= fogfade*0.7+0.3 ;
}
color *= vl.a;
color += vl.rgb;
// bloomy rain effect
float rainDrops = clamp(texture2D(colortex9,texcoord).a, 0.0,1.0);
if(rainDrops > 0.0) vl.a *= clamp(1.0 - pow(rainDrops*5.0,2),0.0,1.0);
gl_FragData[0].r = vl.a;
/// lava.
if (isEyeInWater == 2){
@ -310,6 +305,7 @@ void main() {
if(texcoord.x < 0.45 && luma(thingy) > 0.0 ) color.rgb = thingy;
#endif
gl_FragData[0].r = vl.a; // pass fog alpha so bloom can do bloomy fog
gl_FragData[1].rgb = clamp(color.rgb,0.0,68000.0);
// gl_FragData[1].rgb = vec3(tangentNormals,0.0);

View File

@ -263,8 +263,8 @@ void main() {
float torchlightmap = lmtexcoord.z;
#ifdef Hand_Held_lights
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = mix(torchlightmap, HELD_ITEM_BRIGHTNESS, clamp( max(1.0-length(fragpos)/10,0.0) * 0.7 ,0.0,1.0));
// if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = clamp(torchlightmap + HELD_ITEM_BRIGHTNESS * clamp( max(1.0-length(fragpos)/10,0.0) * 0.7 ,0.0,1.0),0.0,1.0);
// if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = mix(torchlightmap, HELD_ITEM_BRIGHTNESS, clamp( max(1.0-length(fragpos)/10,0.0) ,0.0,1.0));
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(fragpos)/10,0.0),1.5),0.0,1.0));
#endif
float lightmap = clamp( (lmtexcoord.w-0.8) * 10.0,0.,1.);

View File

@ -209,14 +209,14 @@ void main() {
NameTags = 0;
// #ifdef ENTITIES
#ifdef ENTITIES
// // try and single out nametag text and then discard nametag background
// // if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1;
// // if(gl_Color.a < 1.0) NameTags = 1;
// // if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1);
// try and single out nametag text and then discard nametag background
// if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1;
// if(gl_Color.a < 1.0) NameTags = 1;
// if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1);
// #endif
#endif
/////// ----- EMISSIVE STUFF ----- ///////
@ -239,7 +239,7 @@ void main() {
HELD_ITEM_BRIGHTNESS = 0.0;
#ifdef Hand_Held_lights
if(heldItemId == 100 || heldItemId2 == 100) HELD_ITEM_BRIGHTNESS = 1.0;
if(heldItemId == 100 || heldItemId2 == 100) HELD_ITEM_BRIGHTNESS = 0.9;
#endif

View File

@ -95,7 +95,8 @@ vec3 sky_transmittance(vec3 position, vec3 direction, const float steps) {
vec3 calculateAtmosphere(vec3 background, vec3 viewVector, vec3 upVector, vec3 sunVector, vec3 moonVector, out vec2 pid, out vec3 transmittance, const int iSteps, float noise) {
const int jSteps = 4;
vec3 viewPosition = (sky_planetRadius + eyeAltitude) * upVector;
vec2 aid = rsi(viewPosition, viewVector, sky_atmosphereRadius);

View File

@ -85,7 +85,7 @@
// this is to make snow only exist in winter
float FallToWinter_snowfall = mix(0.0, 1.0, AutumnTime);
float WinterToSpring_snowfall = mix(FallToWinter_snowfall, 0.0, WinterTime);
SnowySeason = WinterToSpring_snowfall;
SnowySeason = pow(WinterToSpring_snowfall,10.0);
#else
SnowySeason = 0.0;
#endif

View File

@ -6,15 +6,25 @@ vec3 DoAmbientLighting (vec3 SkyColor, vec3 TorchColor, vec2 Lightmap, float sky
// Lightmap.x = 0.0;
// Lightmap.y = 1.0;
SkyColor = SkyColor * 2.0 * ambient_brightness;
// vec3 TorchLight = TorchColor * pow(1.0-pow(1.0-clamp(Lightmap.x,0.0,1.0) ,0.1),2);
// TorchLight = clamp(exp(TorchLight * 30) - 1.0,0.0,5.0);
// TorchLight *= TORCH_AMOUNT;
vec3 TorchLight = TorchColor * pow(1.0-pow(1.0-clamp(Lightmap.x,0.0,1.0) ,0.1),2);
TorchLight = clamp(exp(TorchLight * 30) - 1.0,0.0,5.0);
// SkyColor = SkyColor * 2.0 * ambient_brightness;
// vec3 SkyLight = max((SkyColor * 8./150./3.) * min(pow(Lightmap.y,3.0),1.0) , vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01)) ;
float TorchLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.x)),5.0)+0.1));
TorchLM = pow(TorchLM/4,10) + pow(Lightmap.x,1.5)*0.5; //pow(TorchLM/4.5,10)*2.5 + pow(Lightmap.x,1.5)*0.5;
vec3 TorchLight = TorchColor * TorchLM * 0.75;
TorchLight *= TORCH_AMOUNT;
vec3 SkyLight = max((SkyColor * 8./150./3.) * min(pow(Lightmap.y,3.0),1.0) , vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01)) ;
// vec3 SkyLight = max((SkyColor * 8./150./3.) * pow(Lightmap.y,3.0),0.0) ;
float skyLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.y)),5.0)+0.1));
skyLM = pow(skyLM/4,10) + pow(Lightmap.y,1.5)*0.5;
SkyColor = SkyColor * ambient_brightness;
vec3 SkyLight = max((SkyColor * skyLM * 0.75) * 8./150./3., vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01));
return SkyLight * skyLightDir + TorchLight;

View File

@ -79,7 +79,7 @@
#define Biome_specific_environment // makes the fog density and color look unique in certain biomes. (swamps, jungles, lush caves, giant pines, dark forests)
#define Cave_fog // cave fog....
#define CaveFogFallOff 1.3 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ]
#define CaveFogFallOff 2.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ]
#define CaveFogColor_R 0.1 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
#define CaveFogColor_G 0.2 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
#define CaveFogColor_B 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
@ -110,7 +110,6 @@
#define RainFog_amount 1 // [0 1 2 3 4 5 6 7 8 9 10 15 20 25]
#define CaveFog_amount 1 // [0 1 2 3 4 5 6 7 8 9 10 15 20 25]
@ -188,7 +187,14 @@
#define sky_coefficientMieG 3.0 //[0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9.0 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10.0 ]
#define sky_coefficientMieB 3.0 //[0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9.0 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10.0 ]
#define sun_illuminance 128000.0 //[10000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 110000.0 120000.0 130000.0 140000.0 160000.0]
uniform int moonPhase;
#define moon_illuminance 200.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0]
#define sunColorR 1.0 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
#define sunColorG 0.91 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
#define sunColorB 0.81 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
@ -199,12 +205,15 @@
#define moonColorG 0.9121 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
#define moonColorB 0.8948 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
#define moonlightbrightness (abs(4-moonPhase))
#define moonlightbrightness2 ((moonlightbrightness/4.0) + 0.05)
#if colortype == 1
#define sunColorBase vec3(sunColorR,sunColorG,sunColorB) * sun_illuminance
#define moonColorBase vec3(moonColorR,moonColorG,moonColorB) * moon_illuminance //Fake Purkinje effect
#else
#define sunColorBase blackbody(Sun_temp) * sun_illuminance
#define moonColorBase blackbody(Moon_temp) * moon_illuminance //Fake Purkinje effect
#define moonColorBase blackbody(Moon_temp) * moon_illuminance * moonlightbrightness2 //Fake Purkinje effect
#endif

View File

@ -139,7 +139,7 @@ vec4 getVolumetricRays(
vec3 rainRays = (sunColor*sh) * (rayL*phaseg(SdotV,0.5)) * clamp(pow(WsunVec.y,5)*2,0.0,1) * rainStrength * noPuddleAreas * RainFog_amount;
vec3 CaveRays = (sunColor*sh) * phaseg(SdotV,0.7) * 0.001 * (1.0 - max(eyeBrightnessSmooth.y,0)/240.);
vec3 vL0 = (DirectLight + AmbientLight + AtmosphericFog + rainRays ) * max(eyeBrightnessSmooth.y,0)/240. + CaveRays ;
vec3 vL0 = (DirectLight + AmbientLight + AtmosphericFog + rainRays ) * max(eyeBrightnessSmooth.y,0)/240. ;
vL += (vL0 - vL0 * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*absorbance;
absorbance *= dot(clamp(exp(-(rL+m)*dd*dL),0.0,1.0), vec3(0.333333));

View File

@ -12,13 +12,12 @@ program.composite4.enabled=TAA_UPSCALING
#Get the correct alpha value : S_A*(1-DST_A)+DST_A
blend.gbuffers_water = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_textured= SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_armor_glint= SRC_ALPHA ZERO ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_textured_lit= SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_weather= SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_water = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
# SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
# SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
@ -32,10 +31,9 @@ blend.gbuffers_skytextured=off
blend.gbuffers_water.colortex11 = off
alphaTest.gbuffers_armor_glint=false
alphaTest.gbuffers_entities=GREATER 0.1
alphaTest.gbuffers_armor_glint=false
alphaTest.gbuffers_weather=false
alphaTest.gbuffers_water=false
alphaTest.gbuffers_skybasic=false
@ -144,7 +142,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
screen.TOD_fog = TOD_Fog_mult <skip> Morning_Uniform_Fog Morning_Cloudy_Fog Noon_Uniform_Fog Noon_Cloudy_Fog Evening_Uniform_Fog Evening_Cloudy_Fog Night_Uniform_Fog Night_Cloudy_Fog
screen.Cave_Fog.columns=1
screen.Cave_Fog = Cave_fog CaveFog_amount CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B
screen.Cave_Fog = Cave_fog CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B
screen.Fog_Color.columns=1
screen.Fog_Color = fog_mieg1 fog_mieg2 fog_coefficientRayleighR fog_coefficientRayleighG fog_coefficientRayleighB fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB