mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-20 16:07:22 +08:00
re-do border fog. make the sunlight get absorbed by the sky more (it gets more colorful). clean up the fog with clouds function
This commit is contained in:
parent
2d64880893
commit
3d58394509
@ -3,6 +3,7 @@
|
|||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
flat varying vec2 TAA_Offset;
|
flat varying vec2 TAA_Offset;
|
||||||
|
|
||||||
|
flat varying vec3 skyGroundColor;
|
||||||
|
|
||||||
uniform sampler2D noisetex;
|
uniform sampler2D noisetex;
|
||||||
uniform sampler2D depthtex0;
|
uniform sampler2D depthtex0;
|
||||||
@ -251,17 +252,6 @@ void main() {
|
|||||||
|
|
||||||
/// --- REFRACTION --- ///
|
/// --- REFRACTION --- ///
|
||||||
#ifdef Refraction
|
#ifdef Refraction
|
||||||
// refractedCoord = clamp(refractedCoord + (tangentNormals * clamp((ld(z2) - ld(z)) * 0.5,0.0,0.15)) * RENDER_SCALE ,-1.0,1.0);
|
|
||||||
|
|
||||||
// // refractedCoord = clamp(refractedCoord - tangentNormals, refractedCoord-0.5,refractedCoord);
|
|
||||||
|
|
||||||
// // if(tangentNormals.xy <= vec2(0.0, 0.0) ) refractedCoord = abs(refractedCoord - tangentNormals);
|
|
||||||
// // refractedCoord += tangentNormals * 0.1 * RENDER_SCALE;
|
|
||||||
|
|
||||||
// float refractedalpha = decodeVec2(texture2D(colortex11,refractedCoord).b).g;
|
|
||||||
// // float refractedalpha2 = texture2D(colortex7,refractedCoord).a;
|
|
||||||
// if( refractedalpha <= 0.001) refractedCoord = texcoord; // remove refracted coords on solids
|
|
||||||
|
|
||||||
ApplyDistortion(refractedCoord, tangentNormals, vec2(z2,z));
|
ApplyDistortion(refractedCoord, tangentNormals, vec2(z2,z));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -272,11 +262,10 @@ void main() {
|
|||||||
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||||
|
|
||||||
#if defined OVERWORLD_SHADER && defined BorderFog
|
#if defined OVERWORLD_SHADER && defined BorderFog
|
||||||
vec3 sky = skyFromTex(np3, colortex4).rgb / 30.0;
|
float fog = exp2(-100.0 * pow(clamp(1.0-length(p3)/far,0.0,1.0),2.0));
|
||||||
float fog = 1.0 - clamp(exp(-pow(length(fragpos / far),10.)*4.0) ,0.0,1.0);
|
fog *= exp(-30.0*(pow(clamp(np3.y,0.0,1.0),2.0))) ;
|
||||||
float heightFalloff = clamp( pow(abs(np3.y-1.01),5) ,0,1) ;
|
|
||||||
|
|
||||||
if(z < 1.0 && isEyeInWater == 0) color.rgb = mix(color.rgb, sky, fog);
|
if(z < 1.0 && isEyeInWater == 0) color.rgb = mix(color.rgb, skyGroundColor, fog);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec4 vl = BilateralUpscale(colortex0, depthtex1, gl_FragCoord.xy, frDepth);
|
vec4 vl = BilateralUpscale(colortex0, depthtex1, gl_FragCoord.xy, frDepth);
|
||||||
@ -291,7 +280,7 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
#ifdef BorderFog
|
#ifdef BorderFog
|
||||||
if(z < 1.0 && isEyeInWater == 0) color.rgb = mix(color.rgb, sky, fog);
|
if(z < 1.0 && isEyeInWater == 0) color.rgb = mix(color.rgb, skyGroundColor, fog);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "/lib/settings.glsl"
|
||||||
|
|
||||||
varying vec2 texcoord;
|
varying vec2 texcoord;
|
||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
uniform float far;
|
uniform float far;
|
||||||
@ -13,6 +15,13 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
|||||||
vec2(-7.,-1.)/8.,
|
vec2(-7.,-1.)/8.,
|
||||||
vec2(3,7.)/8.,
|
vec2(3,7.)/8.,
|
||||||
vec2(7.,-7.)/8.);
|
vec2(7.,-7.)/8.);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef BorderFog
|
||||||
|
uniform sampler2D colortex4;
|
||||||
|
flat varying vec3 skyGroundColor;
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
@ -21,6 +30,9 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
#ifdef BorderFog
|
||||||
|
skyGroundColor = texelFetch2D(colortex4,ivec2(1,37),0).rgb / 30.0;
|
||||||
|
#endif
|
||||||
|
|
||||||
TAA_Offset = offsets[framemod8];
|
TAA_Offset = offsets[framemod8];
|
||||||
|
|
||||||
|
@ -119,26 +119,19 @@ void main() {
|
|||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|
||||||
vec2 planetSphere = vec2(0.0);
|
vec2 planetSphere = vec2(0.0);
|
||||||
vec3 sky = vec3(0.0);
|
|
||||||
vec3 skyAbsorb = vec3(0.0);
|
|
||||||
|
|
||||||
float sunVis = clamp(sunElevation,0.0,0.05)/0.05*clamp(sunElevation,0.0,0.05)/0.05;
|
float sunVis = clamp(sunElevation,0.0,0.05)/0.05*clamp(sunElevation,0.0,0.05)/0.05;
|
||||||
float moonVis = clamp(-sunElevation,0.0,0.05)/0.05*clamp(-sunElevation,0.0,0.05)/0.05;
|
float moonVis = clamp(-sunElevation,0.0,0.05)/0.05*clamp(-sunElevation,0.0,0.05)/0.05;
|
||||||
|
|
||||||
// zenithColor = calculateAtmosphere(vec3(0.0), vec3(0.0,1.0,0.0), vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,tempOffsets.x);
|
vec3 skyAbsorb = vec3(0.0);
|
||||||
skyAbsorb = vec3(0.0);
|
|
||||||
vec3 absorb = vec3(0.0);
|
|
||||||
sunColor = calculateAtmosphere(vec3(0.0), sunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,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;
|
sunColor = sunColorBase/4000. * (skyAbsorb);
|
||||||
|
// skyAbsorb = vec3(1.0);
|
||||||
skyAbsorb = vec3(1.0);
|
// moonColor = calculateAtmosphere(vec3(0.0), -sunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,0.5);
|
||||||
moonColor = calculateAtmosphere(vec3(0.0), -sunVec, vec3(0.0,1.0,0.0), sunVec, -sunVec, planetSphere, skyAbsorb, 25,0.5);
|
|
||||||
moonColor = moonColorBase/4000.0;
|
moonColor = moonColorBase/4000.0;
|
||||||
|
|
||||||
lightSourceColor = sunVis >= 1e-5 ? sunColor * sunVis : moonColor * moonVis;
|
lightSourceColor = sunVis >= 1e-5 ? sunColor * sunVis : moonColor * moonVis;
|
||||||
|
|
||||||
|
|
||||||
// WsunVec = ( float(sunElevation > 1e-5)*2-1. )*normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
@ -6,9 +6,9 @@ uniform sampler2D colortex7;
|
|||||||
uniform vec2 texelSize;
|
uniform vec2 texelSize;
|
||||||
uniform float frameTimeCounter;
|
uniform float frameTimeCounter;
|
||||||
|
|
||||||
uniform sampler2D shadowcolor0;
|
// uniform sampler2D shadowcolor0;
|
||||||
uniform sampler2D shadowtex0;
|
// uniform sampler2D shadowtex0;
|
||||||
uniform sampler2D shadowtex1;
|
// uniform sampler2D shadowtex1;
|
||||||
|
|
||||||
#include "/lib/color_transforms.glsl"
|
#include "/lib/color_transforms.glsl"
|
||||||
#include "/lib/color_dither.glsl"
|
#include "/lib/color_dither.glsl"
|
||||||
@ -161,28 +161,5 @@ void main() {
|
|||||||
|
|
||||||
applyContrast(FINAL_COLOR, CONTRAST); // for fun
|
applyContrast(FINAL_COLOR, CONTRAST); // for fun
|
||||||
|
|
||||||
|
|
||||||
gl_FragColor.rgb = FINAL_COLOR;
|
gl_FragColor.rgb = FINAL_COLOR;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// uniform sampler2D shadowcolor0;
|
|
||||||
// uniform sampler2D shadowtex0;
|
|
||||||
// uniform sampler2D shadowtex1;
|
|
||||||
// vec2 coord = gl_FragCoord.xy;
|
|
||||||
// int invertChecker = int(mod(coord.x,2)) * int(mod(coord.y,2));
|
|
||||||
|
|
||||||
// int checker = int(mod(coord.x*coord.y,2));
|
|
||||||
// int checker2 = int(mod(coord.x*coord.y+1,2));
|
|
||||||
|
|
||||||
// gl_FragColor.rgb = vec3(0.2) * checker * checker2;
|
|
||||||
|
|
||||||
|
|
||||||
// if( hideGUI == 1){
|
|
||||||
// vec2 texrood = texcoord * vec2(2.0, 1.0) - vec2(1.0, 0.0);
|
|
||||||
// if(texcoord.x > 0.5) gl_FragColor.rgb = texture2D(shadowcolor0, texrood).rgb;
|
|
||||||
|
|
||||||
|
|
||||||
// // if(texrood.x > 0.49 && texrood.x < 0.51 && texrood.y > 0.49 && texrood.y < 0.51) gl_FragColor.rgb = vec3(1,0,0);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ float cloudVol(in vec3 pos){
|
|||||||
|
|
||||||
TimeOfDayFog(UniformFog, CloudyFog);
|
TimeOfDayFog(UniformFog, CloudyFog);
|
||||||
|
|
||||||
float testfogshapes = exp(sqrt(max(pos.y - fogYstart - 5,0.0)) / -1) * 50;
|
float testfogshapes = clamp(130 - pos.y,0,1) * 100;
|
||||||
|
// return testfogshapes;
|
||||||
|
|
||||||
return CloudyFog + UniformFog + RainFog;// + testfogshapes;
|
return CloudyFog + UniformFog + RainFog;// + testfogshapes;
|
||||||
}
|
}
|
||||||
@ -108,28 +108,26 @@ vec4 GetVolumetricFog(
|
|||||||
float mie = fogPhase(SdotV) * 5.0;
|
float mie = fogPhase(SdotV) * 5.0;
|
||||||
float rayL = phaseRayleigh(SdotV);
|
float rayL = phaseRayleigh(SdotV);
|
||||||
|
|
||||||
vec3 rC = vec3(fog_coefficientRayleighR*1e-6, fog_coefficientRayleighG*1e-5, fog_coefficientRayleighB*1e-5);
|
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5) * 3.0;
|
||||||
vec3 mC = vec3(fog_coefficientMieR*1e-6, fog_coefficientMieG*1e-6, fog_coefficientMieB*1e-6);
|
vec3 mC = vec3(fog_coefficientMieR*1e-6, fog_coefficientMieG*1e-6, fog_coefficientMieB*1e-6);
|
||||||
|
|
||||||
vec3 LightSourceColor = LightColor;
|
vec3 skyLightPhased = AmbientColor;
|
||||||
|
vec3 LightSourcePhased = LightColor;
|
||||||
|
|
||||||
#ifdef ambientLight_only
|
#ifdef ambientLight_only
|
||||||
LightSourceColor = vec3(0.0);
|
LightSourcePhased = vec3(0.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec3 skyCol0 = AmbientColor;
|
|
||||||
|
|
||||||
#ifdef PER_BIOME_ENVIRONMENT
|
#ifdef PER_BIOME_ENVIRONMENT
|
||||||
BiomeFogColor(LightSourceColor);
|
BiomeFogColor(LightSourcePhased);
|
||||||
BiomeFogColor(skyCol0);
|
BiomeFogColor(skyLightPhased);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
skyCol0 = max(skyCol0 + skyCol0*(normalize(wpos).y*0.9+0.1),0.0);
|
skyLightPhased = max(skyLightPhased + skyLightPhased*(normalize(wpos).y*0.9+0.1),0.0);
|
||||||
|
LightSourcePhased *= mie;
|
||||||
|
|
||||||
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||||
|
|
||||||
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||||
///// ----- cloud stuff
|
|
||||||
|
|
||||||
// first cloud layer
|
// first cloud layer
|
||||||
float MinHeight_0 = Cumulus_height;
|
float MinHeight_0 = Cumulus_height;
|
||||||
float MaxHeight_0 = 100 + MinHeight_0;
|
float MaxHeight_0 = 100 + MinHeight_0;
|
||||||
@ -138,7 +136,11 @@ vec4 GetVolumetricFog(
|
|||||||
float MinHeight_1 = MaxHeight_0 + 50;
|
float MinHeight_1 = MaxHeight_0 + 50;
|
||||||
float MaxHeight_1 = 100 + MinHeight_1;
|
float MaxHeight_1 = 100 + MinHeight_1;
|
||||||
|
|
||||||
vec3 SkyColor = AmbientColor;
|
vec3 SkyLightColor = AmbientColor;
|
||||||
|
vec3 LightSourceColor = LightColor;
|
||||||
|
#ifdef ambientLight_only
|
||||||
|
LightSourceColor = vec3(0.0);
|
||||||
|
#endif
|
||||||
|
|
||||||
float shadowStep = 200.0;
|
float shadowStep = 200.0;
|
||||||
|
|
||||||
@ -147,10 +149,10 @@ vec4 GetVolumetricFog(
|
|||||||
float mieDay = phaseg(SdotV, 0.75);
|
float mieDay = phaseg(SdotV, 0.75);
|
||||||
float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5) ;
|
float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5) ;
|
||||||
|
|
||||||
vec3 directScattering = LightColor * mieDay * 3.14;
|
vec3 directScattering = LightSourceColor * mieDay * 3.14;
|
||||||
vec3 directMultiScattering = LightColor * mieDayMulti * 4.0;
|
vec3 directMultiScattering = LightSourceColor * mieDayMulti * 4.0;
|
||||||
|
|
||||||
vec3 sunIndirectScattering = LightColor * phaseg(dot(mat3(gbufferModelView)*vec3(0,1,0),normalize(viewPosition)), 0.5) * 3.14;
|
vec3 sunIndirectScattering = LightSourceColor * phaseg(dot(mat3(gbufferModelView)*vec3(0,1,0),normalize(viewPosition)), 0.5) * 3.14;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float expFactor = 11.0;
|
float expFactor = 11.0;
|
||||||
@ -189,30 +191,27 @@ vec4 GetVolumetricFog(
|
|||||||
vec3 rL = rC*airCoef.x;
|
vec3 rL = rC*airCoef.x;
|
||||||
vec3 m = (airCoef.y+density) * mC;
|
vec3 m = (airCoef.y+density) * mC;
|
||||||
|
|
||||||
vec3 AtmosphericFog = skyCol0 * (rL*3.0 + m);
|
vec3 Atmosphere = skyLightPhased * (rL + m); // not pbr so just make the atmosphere also dense fog heh
|
||||||
vec3 DirectLight = (LightSourceColor*sh) * (rayL*rL*3.0 + m*mie);
|
vec3 DirectLight = LightSourcePhased * sh * (rL*rayL + m);
|
||||||
vec3 AmbientLight = skyCol0 * m;
|
vec3 Lightning = Iris_Lightningflash_VLfog(progressW-cameraPosition, lightningBoltPosition.xyz) * (rL + m);
|
||||||
vec3 Lightning = Iris_Lightningflash_VLfog(progressW-cameraPosition, lightningBoltPosition.xyz) * m;
|
|
||||||
|
|
||||||
vec3 lighting = (AtmosphericFog + AmbientLight + DirectLight + Lightning) * lightleakfix;
|
vec3 lighting = (Atmosphere + DirectLight + Lightning) * lightleakfix;
|
||||||
|
|
||||||
|
color += (lighting - lighting * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*absorbance;
|
||||||
color += max(lighting - lighting * exp(-(rL+m)*dd*dL),0.0) / max(rL+m, 0.00000001)*absorbance;
|
absorbance *= clamp(exp(-(rL+m)*dd*dL),0.0,1.0);
|
||||||
absorbance *= max(exp(-(rL+m)*dd*dL),0.0);
|
|
||||||
|
|
||||||
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
///// ----- cloud part
|
///// ----- cloud part
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
|
float curvature = pow(clamp(1.0 - length(progressW)/far,0,1),2) * 50;
|
||||||
|
|
||||||
// determine the base of each cloud layer
|
// determine the base of each cloud layer
|
||||||
bool isUpperLayer = max(progressW.y - MinHeight_1,0.0) > 0.0;
|
bool isUpperLayer = max(progressW.y - MinHeight_1,0.0) > 0.0;
|
||||||
float CloudBaseHeights = isUpperLayer ? 200.0 + MaxHeight_0 : MaxHeight_0;
|
float CloudBaseHeights = isUpperLayer ? 200.0 + MaxHeight_0 : MaxHeight_0;
|
||||||
|
|
||||||
float curvature = pow(clamp(1.0 - length(progressW)/far,0,1),2) * 50;
|
|
||||||
|
|
||||||
float cumulus = GetCumulusDensity(progressW, 1, MinHeight_0, MaxHeight_0);
|
float cumulus = GetCumulusDensity(progressW, 1, MinHeight_0, MaxHeight_0);
|
||||||
|
|
||||||
float fadedDensity = Cumulus_density * clamp(exp( (progressW.y - (CloudBaseHeights - 70)) / 9.0 ),0.0,1.0);
|
float fadedDensity = Cumulus_density * clamp(exp( (progressW.y - (CloudBaseHeights - 70)) / 9.0 ),0.0,1.0);
|
||||||
|
|
||||||
if(cumulus > 1e-5){
|
if(cumulus > 1e-5){
|
||||||
@ -233,17 +232,15 @@ vec4 GetVolumetricFog(
|
|||||||
float skylightOcclusion = max(exp2((upperLayerOcclusion*upperLayerOcclusion) * -5), 0.75);
|
float skylightOcclusion = max(exp2((upperLayerOcclusion*upperLayerOcclusion) * -5), 0.75);
|
||||||
|
|
||||||
float skyScatter = clamp((CloudBaseHeights - 20 - progressW.y) / 275.0,0.0,1.0);
|
float skyScatter = clamp((CloudBaseHeights - 20 - progressW.y) / 275.0,0.0,1.0);
|
||||||
vec3 Lighting = DoCloudLighting(muE, cumulus, SkyColor*skylightOcclusion, skyScatter, directLight, directScattering*sh2, directMultiScattering*sh2, 1);
|
vec3 Lighting = DoCloudLighting(muE, cumulus, SkyLightColor*skylightOcclusion, skyScatter, directLight, directScattering*sh2, directMultiScattering*sh2, 1.0);
|
||||||
|
|
||||||
// a horrible approximation of direct light indirectly hitting the lower layer of clouds after scattering through/bouncing off the upper layer.
|
// a horrible approximation of direct light indirectly hitting the lower layer of clouds after scattering through/bouncing off the upper layer.
|
||||||
Lighting += sunIndirectScattering * exp((skyScatter*skyScatter) * cumulus * -35.0) * upperLayerOcclusion * exp(-20.0 * pow(abs(upperLayerOcclusion - 0.3),2));
|
Lighting += sunIndirectScattering * exp((skyScatter*skyScatter) * cumulus * -35.0) * upperLayerOcclusion * exp(-20.0 * pow(abs(upperLayerOcclusion - 0.3),2));
|
||||||
|
|
||||||
|
|
||||||
color += max(Lighting - Lighting*exp(-muE*dd*dL),0.0) * absorbance;
|
color += max(Lighting - Lighting*exp(-muE*dd*dL),0.0) * absorbance;
|
||||||
absorbance *= max(exp(-muE*dd*dL),0.0);
|
absorbance *= max(exp(-muE*dd*dL),0.0);
|
||||||
}
|
}
|
||||||
#endif /// VL CLOUDS
|
#endif /// VL CLOUDS
|
||||||
|
|
||||||
}
|
}
|
||||||
return vec4(color, min(dot(absorbance,vec3(0.335)),1.0));
|
return vec4(color, min(dot(absorbance,vec3(0.335)),1.0));
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,11 @@ const float sunPathRotation = -35; //[-90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -8
|
|||||||
#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]
|
#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]
|
||||||
|
|
||||||
// #define BorderFog
|
// #define BorderFog
|
||||||
|
|
||||||
|
#if !defined OVERWORLD_SHADER
|
||||||
|
#undef BorderFog
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SEA_LEVEL 70 // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 150 170 190]
|
#define SEA_LEVEL 70 // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 150 170 190]
|
||||||
|
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
@ -341,7 +346,7 @@ uniform int moonPhase;
|
|||||||
#define Cumulus
|
#define Cumulus
|
||||||
#define Cumulus_coverage 0.7 // [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]
|
#define Cumulus_coverage 0.7 // [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]
|
||||||
#define Cumulus_density 0.5 // [0.01 0.F02 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.00]
|
#define Cumulus_density 0.5 // [0.01 0.F02 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.00]
|
||||||
#define Cumulus_height 250 // [-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000]
|
#define Cumulus_height 250 // [-300 -290 -280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000]
|
||||||
|
|
||||||
#define Cumulus2_coverage 0.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]
|
#define Cumulus2_coverage 0.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]
|
||||||
|
|
||||||
@ -352,7 +357,7 @@ uniform int moonPhase;
|
|||||||
|
|
||||||
#define Rain_coverage 1.1 // [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]
|
#define Rain_coverage 1.1 // [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]
|
||||||
|
|
||||||
#define fbmAmount 0.4 // [0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 0.22 0.24 0.26 0.28 0.30 0.32 0.34 0.36 0.38 0.40 0.42 0.44 0.46 0.48 0.50 0.52 0.54 0.56 0.58 0.60 0.62 0.64 0.66 0.68 0.70 0.72 0.74 0.76 0.78 0.80 0.82 0.84 0.86 0.88 0.90 0.92 0.94 0.96 0.98 1.00 1.02 1.04 1.06 1.08 1.10 1.12 1.14 1.16 1.18 1.20 1.22 1.24 1.26 1.28 1.30 1.32 1.34 1.36 1.38 1.40 1.42 1.44 1.46 1.48 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00]
|
#define fbmAmount 0.5 // [0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 0.22 0.24 0.26 0.28 0.30 0.32 0.34 0.36 0.38 0.40 0.42 0.44 0.46 0.48 0.50 0.52 0.54 0.56 0.58 0.60 0.62 0.64 0.66 0.68 0.70 0.72 0.74 0.76 0.78 0.80 0.82 0.84 0.86 0.88 0.90 0.92 0.94 0.96 0.98 1.00 1.02 1.04 1.06 1.08 1.10 1.12 1.14 1.16 1.18 1.20 1.22 1.24 1.26 1.28 1.30 1.32 1.34 1.36 1.38 1.40 1.42 1.44 1.46 1.48 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00]
|
||||||
#define fbmPower1 3.00 // [1.0 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00 3.02 3.04 3.06 3.08 3.10 3.12 3.14 3.16 3.18 3.20 3.22 3.24 3.26 3.28 3.30 3.32 3.34 3.36 3.38 3.40 3.42 3.44 3.46 3.48 3.50 3.52 3.54 3.56 3.58 3.60 3.62 3.64 3.66 3.68 3.70 3.72 3.74 3.76 3.78 3.80 3.82 3.84 3.86 3.88 3.90 3.92 3.94 3.96 3.98 4.00 5. 6. 7. 8. 9. 10.]
|
#define fbmPower1 3.00 // [1.0 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00 3.02 3.04 3.06 3.08 3.10 3.12 3.14 3.16 3.18 3.20 3.22 3.24 3.26 3.28 3.30 3.32 3.34 3.36 3.38 3.40 3.42 3.44 3.46 3.48 3.50 3.52 3.54 3.56 3.58 3.60 3.62 3.64 3.66 3.68 3.70 3.72 3.74 3.76 3.78 3.80 3.82 3.84 3.86 3.88 3.90 3.92 3.94 3.96 3.98 4.00 5. 6. 7. 8. 9. 10.]
|
||||||
#define fbmPower2 2.50 // [1.00 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00 3.02 3.04 3.06 3.08 3.10 3.12 3.14 3.16 3.18 3.20 3.22 3.24 3.26 3.28 3.30 3.32 3.34 3.36 3.38 3.40 3.42 3.44 3.46 3.48 3.50 3.52 3.54 3.56 3.58 3.60 3.62 3.64 3.66 3.68 3.70 3.72 3.74 3.76 3.78 3.80 3.82 3.84 3.86 3.88 3.90 3.92 3.94 3.96 3.98 4.00 5. 6. 7. 8. 9. 10.]
|
#define fbmPower2 2.50 // [1.00 1.50 1.52 1.54 1.56 1.58 1.60 1.62 1.64 1.66 1.68 1.70 1.72 1.74 1.76 1.78 1.80 1.82 1.84 1.86 1.88 1.90 1.92 1.94 1.96 1.98 2.00 2.02 2.04 2.06 2.08 2.10 2.12 2.14 2.16 2.18 2.20 2.22 2.24 2.26 2.28 2.30 2.32 2.34 2.36 2.38 2.40 2.42 2.44 2.46 2.48 2.50 2.52 2.54 2.56 2.58 2.60 2.62 2.64 2.66 2.68 2.70 2.72 2.74 2.76 2.78 2.80 2.82 2.84 2.86 2.88 2.90 2.92 2.94 2.96 2.98 3.00 3.02 3.04 3.06 3.08 3.10 3.12 3.14 3.16 3.18 3.20 3.22 3.24 3.26 3.28 3.30 3.32 3.34 3.36 3.38 3.40 3.42 3.44 3.46 3.48 3.50 3.52 3.54 3.56 3.58 3.60 3.62 3.64 3.66 3.68 3.70 3.72 3.74 3.76 3.78 3.80 3.82 3.84 3.86 3.88 3.90 3.92 3.94 3.96 3.98 4.00 5. 6. 7. 8. 9. 10.]
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ float AltostratusHeight = 2000;
|
|||||||
|
|
||||||
float rainCloudwetness = rainStrength;
|
float rainCloudwetness = rainStrength;
|
||||||
// float cloud_movement = frameTimeCounter * Cloud_Speed ;
|
// float cloud_movement = frameTimeCounter * Cloud_Speed ;
|
||||||
float cloud_movement = (worldTime / 24.0) * Cloud_Speed ;
|
// float cloud_movement = abs((12000 - worldTime) * Cloud_Speed ) * 0.05;
|
||||||
|
float cloud_movement = (worldTime / 24.0) * Cloud_Speed;
|
||||||
|
|
||||||
//3D noise from 2d texture
|
//3D noise from 2d texture
|
||||||
float densityAtPos(in vec3 pos){
|
float densityAtPos(in vec3 pos){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user