fix compile error when floodfill gets enabled. fix compile error when TAA is turned off. fix compile error when aerochrome is turned on. re-added "render clouds as fog" setting. fix DOF using wrong depth buffer for CoC. fix cave fog when DH is enabled. fix block breaking effect not having alpha discard. changed "clouds intersect terrain" setting to work better on edges, but work worse everywhere else.

This commit is contained in:
Xonk 2024-06-12 20:56:14 -04:00
parent 4d2a30af6a
commit 04bbc79b89
17 changed files with 169 additions and 75 deletions

View File

@ -117,8 +117,8 @@ void main() {
float materials = normals_and_materials.a; float materials = normals_and_materials.a;
vec2 PackLightmaps = lightmapCoords; vec2 PackLightmaps = lightmapCoords;
PackLightmaps.y *= 1.05; // PackLightmaps.y *= 1.05;
PackLightmaps = min(max(PackLightmaps - 0.001*blueNoise(),0.0)*1.002,1.0); // PackLightmaps = min(max(PackLightmaps - 0.001*blueNoise(),0.0)*1.002,1.0);
vec4 data1 = clamp( encode(normals.xyz, PackLightmaps), 0.0, 1.0); vec4 data1 = clamp( encode(normals.xyz, PackLightmaps), 0.0, 1.0);

View File

@ -252,12 +252,12 @@ float ld(float dist) {
return (2.0 * near) / (far + near - dist * (far - near)); return (2.0 * near) / (far + near - dist * (far - near));
} }
vec3 texture2D_POMSwitch( vec4 texture2D_POMSwitch(
sampler2D sampler, sampler2D sampler,
vec2 lightmapCoord, vec2 lightmapCoord,
vec4 dcdxdcdy vec4 dcdxdcdy
){ ){
return texture2DGradARB(sampler, lightmapCoord, dcdxdcdy.xy, dcdxdcdy.zw).rgb; return texture2DGradARB(sampler, lightmapCoord, dcdxdcdy.xy, dcdxdcdy.zw);
} }
//////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN//////////////////////////////
@ -332,12 +332,14 @@ void main() {
} }
} }
vec3 Albedo = toLinear(texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy))); vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy));
#else #else
vec3 Albedo = toLinear(texture2D(texture, adjustedTexCoord.xy).rgb); vec4 Albedo = texture2D(texture, adjustedTexCoord.xy);
#endif #endif
if(dot(Albedo.rgb, vec3(0.33333)) < 1.0/255.0) { discard; return; } Albedo.rgb = toLinear(Albedo.rgb);
if(dot(Albedo.rgb, vec3(0.33333)) < 1.0/255.0 || Albedo.a < 0.01 ) { discard; return; }
gl_FragData[0] = vec4(encodeVec2(vec2(0.5)), encodeVec2(Albedo.rg), encodeVec2(vec2(Albedo.b,0.02)), 1.0); gl_FragData[0] = vec4(encodeVec2(vec2(0.5)), encodeVec2(Albedo.rg), encodeVec2(vec2(Albedo.b,0.02)), 1.0);
#endif #endif

View File

@ -1,6 +1,9 @@
#extension GL_ARB_shader_texture_lod : enable #extension GL_ARB_shader_texture_lod : enable
#include "/lib/settings.glsl" #include "/lib/settings.glsl"
#include "/lib/blocks.glsl"
#include "/lib/entities.glsl"
#include "/lib/items.glsl"
flat varying int NameTags; flat varying int NameTags;
@ -415,9 +418,9 @@ void main() {
#ifdef AEROCHROME_MODE #ifdef AEROCHROME_MODE
float gray = dot(Albedo.rgb, vec3(0.2, 1.0, 0.07)); float gray = dot(Albedo.rgb, vec3(0.2, 1.0, 0.07));
if ( if (
blockID == BLOCK_AMETHYST_BUD_MEDIUM || blockID == BLOCK_AMETHYST_BUD_LARGE || blockID == BLOCK_AMETHYST_CLUSTER || blockID == BLOCK_AMETHYST_BUD_MEDIUM || blockID == BLOCK_AMETHYST_BUD_LARGE || blockID == BLOCK_AMETHYST_CLUSTER
blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SSS_WEAK || || blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SSS_WEAK
blockID >= 10 && blockId < 80 || blockID >= 10 && blockID < 80
) { ) {
// IR Reflective (Pink-red) // IR Reflective (Pink-red)
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7); Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);

View File

@ -229,10 +229,9 @@ void main() {
normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0); normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
FlatNormals = normalMat.xyz; FlatNormals = normalMat.xyz;
blockID = mc_Entity.x; blockID = mc_Entity.x ;
// velocity = at_velocity;
if(mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL || mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_GRASS_TALL_LOWER || mc_Entity.x == BLOCK_GRASS_TALL_UPPER ) normalMat.a = 0.60; if(blockID == BLOCK_GROUND_WAVING_VERTICAL || blockID == BLOCK_GRASS_SHORT || blockID == BLOCK_GRASS_TALL_LOWER || blockID == BLOCK_GRASS_TALL_UPPER ) normalMat.a = 0.60;
PORTAL = 0; PORTAL = 0;

View File

@ -515,10 +515,10 @@ void BilateralUpscale_REUSE_Z(sampler2D tex1, sampler2D tex2, sampler2D depth, v
ivec2 pos = ivec2(gl_FragCoord.xy*texelSize + 1); ivec2 pos = ivec2(gl_FragCoord.xy*texelSize + 1);
ivec2 getRadius[4] = ivec2[]( ivec2 getRadius[4] = ivec2[](
ivec2(-2,-2), ivec2(-1,-1),
ivec2(-2, 0), ivec2(-1, 0),
ivec2( 0, 0), ivec2( 0, 0),
ivec2( 0,-2) ivec2( 0,-1)
); );
#ifdef DISTANT_HORIZONS #ifdef DISTANT_HORIZONS
@ -729,12 +729,15 @@ void main() {
vec3 albedo = toLinear(vec3(dataUnpacked0.xz,dataUnpacked1.x)); vec3 albedo = toLinear(vec3(dataUnpacked0.xz,dataUnpacked1.x));
vec3 normal = decode(dataUnpacked0.yw); vec3 normal = decode(dataUnpacked0.yw);
vec2 lightmap = min(max(dataUnpacked1.yz - 0.05,0.0)*1.06,1.0);// small offset to hide flickering from precision error in the encoding/decoding on values close to 1.0 or 0.0 vec2 lightmap = dataUnpacked1.yz;
lightmap.xy = min(max(lightmap.xy - 0.05,0.0)*1.06,1.0); // small offset to hide flickering from precision error in the encoding/decoding on values close to 1.0 or 0.0
#if defined END_SHADER || defined NETHER_SHADER #if defined END_SHADER || defined NETHER_SHADER
lightmap.y = 1.0; lightmap.y = 1.0;
#endif #endif
// lightmap.y = 0.0;
// if(isDHrange) lightmap.y = pow(lightmap.y,25);
// if(isEyeInWater == 1) lightmap.y = max(lightmap.y, 0.75); // if(isEyeInWater == 1) lightmap.y = max(lightmap.y, 0.75);
////// --------------- UNPACK MISC --------------- ////// ////// --------------- UNPACK MISC --------------- //////
@ -888,7 +891,9 @@ void main() {
#endif #endif
#endif #endif
Background *= 1.0 - exp2(-50.0 * pow(clamp(feetPlayerPos_normalized.y+0.025,0.0,1.0),2.0) ); // darken the ground in the sky. #ifdef SKY_GROUND
Background *= 1.0 - exp2(-50.0 * pow(clamp(feetPlayerPos_normalized.y+0.025,0.0,1.0),2.0) ); // darken the ground in the sky.
#endif
vec3 Sky = skyFromTex(feetPlayerPos_normalized, colortex4)/30.0 * Sky_Brightness; vec3 Sky = skyFromTex(feetPlayerPos_normalized, colortex4)/30.0 * Sky_Brightness;
Background += Sky; Background += Sky;
@ -1226,14 +1231,14 @@ void main() {
gl_FragData[0].rgb = gl_FragData[0].rgb * vlBehingTranslucents.a + vlBehingTranslucents.rgb; gl_FragData[0].rgb = gl_FragData[0].rgb * vlBehingTranslucents.a + vlBehingTranslucents.rgb;
} }
#if defined VOLUMETRIC_CLOUDS && defined CLOUDS_INTERSECT_TERRAIN // #if defined VOLUMETRIC_CLOUDS && defined CLOUDS_INTERSECT_TERRAIN
vec4 Clouds = texture2D_bicubic_offset(colortex0, ((gl_FragCoord.xy + 0.5)*texelSize)*CLOUDS_QUALITY, noise, RENDER_SCALE.x); // vec4 Clouds = texture2D_bicubic_offset(colortex0, ((gl_FragCoord.xy + 0.5)*texelSize)*CLOUDS_QUALITY, noise, RENDER_SCALE.x);
// vec4 Clouds = BilateralUpscale_REUSE_Z_clouds(colortex0, colortex12, DH_mixedLinearZ, gl_FragCoord.xy*CLOUDS_QUALITY, texcoord*CLOUDS_QUALITY); // // vec4 Clouds = BilateralUpscale_REUSE_Z_clouds(colortex0, colortex12, DH_mixedLinearZ, gl_FragCoord.xy*CLOUDS_QUALITY, texcoord*CLOUDS_QUALITY);
gl_FragData[1] = texture2D(colortex2, texcoord); // gl_FragData[1] = texture2D(colortex2, texcoord);
gl_FragData[0].rgb = gl_FragData[0].rgb * Clouds.a + Clouds.rgb; // gl_FragData[0].rgb = gl_FragData[0].rgb * Clouds.a + Clouds.rgb;
gl_FragData[1].a = gl_FragData[1].a * pow(Clouds.a,5.0); // gl_FragData[1].a = gl_FragData[1].a * pow(Clouds.a,5.0);
#endif // #endif
// gl_FragData[0].rgb = vec3(1.0) * clamp(1.0 - filteredShadow.y/1,0,1); // gl_FragData[0].rgb = vec3(1.0) * clamp(1.0 - filteredShadow.y/1,0,1);
// if(hideGUI > 0) gl_FragData[0].rgb = vec3(1.0) * Shadows; // if(hideGUI > 0) gl_FragData[0].rgb = vec3(1.0) * Shadows;
@ -1267,7 +1272,8 @@ void main() {
if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * (1.0 - SSAO_SSS.x); if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * (1.0 - SSAO_SSS.x);
// if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * filteredShadow.z;//exp(-7*(1-clamp(1.0 - filteredShadow.x,0.0,1.0))); // if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * filteredShadow.z;//exp(-7*(1-clamp(1.0 - filteredShadow.x,0.0,1.0)));
#endif #endif
// gl_FragData[0].rgb = vec3(1) * lightmap.y;
// if(swappedDepth >= 1.0) gl_FragData[0].rgb = vec3(0.1);
// gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex1, texcoord).r); // gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex1, texcoord).r);
// if(texcoord.x > 0.5 )gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex0, texcoord).r); // if(texcoord.x > 0.5 )gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex0, texcoord).r);

View File

@ -107,7 +107,7 @@ void main() {
#if DOF_QUALITY >= 0 #if DOF_QUALITY >= 0
/*--------------------------------*/ /*--------------------------------*/
float z = ld(texture2D(depthtex0, texcoord.st*RENDER_SCALE).r)*far; float z = ld(texture2D(depthtex1, texcoord.st*RENDER_SCALE).r)*far;
#if MANUAL_FOCUS == -2 #if MANUAL_FOCUS == -2
float focus = rodExposureDepth.y*far; float focus = rodExposureDepth.y*far;
#elif MANUAL_FOCUS == -1 #elif MANUAL_FOCUS == -1
@ -120,10 +120,10 @@ void main() {
#ifdef FAR_BLUR_ONLY #ifdef FAR_BLUR_ONLY
pcoc *= float(z > focus); pcoc *= float(z > focus);
#endif #endif
float noise = blueNoise()*6.28318530718; // float noise = blueNoise()*6.28318530718;
mat2 noiseM = mat2( cos( noise ), -sin( noise ), // mat2 noiseM = mat2( cos( noise ), -sin( noise ),
sin( noise ), cos( noise ) // sin( noise ), cos( noise )
); // );
vec3 bcolor = vec3(0.); vec3 bcolor = vec3(0.);
float nb = 0.0; float nb = 0.0;
vec2 bcoord = vec2(0.0); vec2 bcoord = vec2(0.0);

View File

@ -13,6 +13,7 @@ uniform sampler2D dhDepthTex;
uniform sampler2D dhDepthTex1; uniform sampler2D dhDepthTex1;
#endif #endif
uniform sampler2D colortex0;
uniform sampler2D colortex2; uniform sampler2D colortex2;
uniform sampler2D colortex3; uniform sampler2D colortex3;
// uniform sampler2D colortex4; // uniform sampler2D colortex4;
@ -81,6 +82,7 @@ float linearizeDepthFast(const in float depth, const in float near, const in flo
#include "/lib/volumetricClouds.glsl" #include "/lib/volumetricClouds.glsl"
// #define CLOUDS_INTERSECT_TERRAIN
#include "/lib/overworld_fog.glsl" #include "/lib/overworld_fog.glsl"
#endif #endif
#ifdef NETHER_SHADER #ifdef NETHER_SHADER
@ -404,6 +406,14 @@ void main() {
#if defined NETHER_SHADER || defined END_SHADER #if defined NETHER_SHADER || defined END_SHADER
vec4 VolumetricFog = GetVolumetricFog(viewPos0, noise_1, noise_2); vec4 VolumetricFog = GetVolumetricFog(viewPos0, noise_1, noise_2);
#endif #endif
#if defined VOLUMETRIC_CLOUDS && defined CLOUDS_INTERSECT_TERRAIN
vec4 Clouds = texture2D(colortex0, (gl_FragCoord.xy*texelSize) / (VL_RENDER_RESOLUTION/CLOUDS_QUALITY));
VolumetricFog.rgb = Clouds.rgb * VolumetricFog.a + VolumetricFog.rgb;
VolumetricFog.a = VolumetricFog.a*Clouds.a;
#endif
gl_FragData[0] = clamp(VolumetricFog, 0.0, 65000.0); gl_FragData[0] = clamp(VolumetricFog, 0.0, 65000.0);

View File

@ -114,7 +114,6 @@ vec4 BilateralUpscale(sampler2D tex, sampler2D depth, vec2 coord, float referenc
ivec2 posDepth = ivec2(coord*VL_RENDER_RESOLUTION) * scaling; ivec2 posDepth = ivec2(coord*VL_RENDER_RESOLUTION) * scaling;
ivec2 posColor = ivec2(coord*VL_RENDER_RESOLUTION); ivec2 posColor = ivec2(coord*VL_RENDER_RESOLUTION);
ivec2 pos = ivec2(gl_FragCoord.xy*texelSize + 1); ivec2 pos = ivec2(gl_FragCoord.xy*texelSize + 1);
ivec2 getRadius[4] = ivec2[]( ivec2 getRadius[4] = ivec2[](
ivec2(-2,-2), ivec2(-2,-2),
ivec2(-2, 0), ivec2(-2, 0),
@ -266,6 +265,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);
float lightleakfixfast = clamp(eyeBrightness.y/240.,0.0,1.0); float lightleakfixfast = clamp(eyeBrightness.y/240.,0.0,1.0);
////// --------------- UNPACK OPAQUE GBUFFERS --------------- //////
// float opaqueMasks = decodeVec2(texture2D(colortex1,texcoord).a).y;
// bool isOpaque_entity = abs(opaqueMasks-0.45) < 0.01;
////// --------------- UNPACK TRANSLUCENT GBUFFERS --------------- ////// ////// --------------- UNPACK TRANSLUCENT GBUFFERS --------------- //////
vec4 data = texture2D(colortex11,texcoord).rgba; vec4 data = texture2D(colortex11,texcoord).rgba;
vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g)) ; vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g)) ;
@ -292,9 +295,9 @@ void main() {
////// --------------- get volumetrics ////// --------------- get volumetrics
#ifdef TOGGLE_VL_FOG #ifdef TOGGLE_VL_FOG
#ifdef DISTANT_HORIZONS #ifdef DISTANT_HORIZONS
vec4 vl = BilateralUpscale(colortex0, colortex12, gl_FragCoord.xy, sqrt(texture2D(colortex12,texcoord).a/65000.0)); vec4 vl = BilateralUpscale(colortex0, colortex12, gl_FragCoord.xy - 1.5, sqrt(texture2D(colortex12,texcoord).a/65000.0));
#else #else
vec4 vl = BilateralUpscale(colortex0, depthtex0, gl_FragCoord.xy, frDepth); vec4 vl = BilateralUpscale(colortex0, depthtex0, gl_FragCoord.xy - 1.5, frDepth);
#endif #endif
#else #else
vec4 vl = vec4(0,0,0,1); vec4 vl = vec4(0,0,0,1);
@ -327,10 +330,12 @@ void main() {
fog *= exp(-10.0 * pow(clamp(np3.y,0.0,1.0)*4.0,2.0)); fog *= exp(-10.0 * pow(clamp(np3.y,0.0,1.0)*4.0,2.0));
fog *= caveDetection;
if(swappedDepth >= 1.0 || isEyeInWater != 0) fog = 0.0; if(swappedDepth >= 1.0 || isEyeInWater != 0) fog = 0.0;
// fog *= lightleakfix;
#ifdef SKY_GROUND #ifdef SKY_GROUND
vec3 borderFogColor = skyGroundColor; vec3 borderFogColor = skyGroundColor;
#else #else
@ -350,8 +355,9 @@ void main() {
#ifdef BorderFog #ifdef BorderFog
TranslucentShader = mix(TranslucentShader, vec4(0.0), fog); TranslucentShader = mix(TranslucentShader, vec4(0.0), fog);
#endif #endif
color = color*(1.0-TranslucentShader.a) + TranslucentShader.rgb*10.0; color *= (1.0-TranslucentShader.a);
color += TranslucentShader.rgb*10.0;
} }
////// --------------- VARIOUS FOG EFFECTS (behind volumetric fog) ////// --------------- VARIOUS FOG EFFECTS (behind volumetric fog)
@ -372,7 +378,7 @@ void main() {
float skyhole = pow(clamp(1.0-pow(max(np3.y - 0.6,0.0)*5.0,2.0),0.0,1.0),2); float skyhole = pow(clamp(1.0-pow(max(np3.y - 0.6,0.0)*5.0,2.0),0.0,1.0),2);
color.rgb = mix(color.rgb + cavefogCol * caveDetection, cavefogCol, swappedDepth >= 1.0 ? skyhole * caveDetection : 0.0); color.rgb = mix(color.rgb + cavefogCol * caveDetection, cavefogCol, z >= 1.0 ? skyhole * caveDetection : 0.0);
} }
#endif #endif
@ -459,7 +465,6 @@ void main() {
gl_FragData[0].r = bloomyFogMult; // pass fog alpha so bloom can do bloomy fog gl_FragData[0].r = bloomyFogMult; // pass fog alpha so bloom can do bloomy fog
gl_FragData[1].rgb = clamp(color.rgb, 0.0,68000.0); gl_FragData[1].rgb = clamp(color.rgb, 0.0,68000.0);
// gl_FragData[1].rgb = vec3(tangentNormals.xy,0.0) ; // gl_FragData[1].rgb = vec3(tangentNormals.xy,0.0) ;
// gl_FragData[1].rgb = vec3(1.0) * ld( (data.a > 0.0 ? data.a : texture2D(depthtex0, texcoord).x ) ) ; // gl_FragData[1].rgb = vec3(1.0) * ld( (data.a > 0.0 ? data.a : texture2D(depthtex0, texcoord).x ) ) ;
// gl_FragData[1].rgb = gl_FragData[1].rgb * (1.0-TranslucentShader.a) + TranslucentShader.rgb*10.0; // gl_FragData[1].rgb = gl_FragData[1].rgb * (1.0-TranslucentShader.a) + TranslucentShader.rgb*10.0;

View File

@ -456,7 +456,7 @@ void main() {
gl_FragData[0] = clamp(fp10Dither(color, triangularize(interleaved_gradientNoise())), 0.0, 65000.0); gl_FragData[0] = clamp(fp10Dither(color, triangularize(interleaved_gradientNoise())), 0.0, 65000.0);
#endif #endif
#else #else
vec3 color = clamp(fp10Dither(vec4(texture2D(colortex3,taauTC).rgb,1.0), triangularize(interleaved_gradientNoise())).rgb,0.0,65000.); vec3 color = clamp(fp10Dither(vec4(texture2D(colortex3,texcoord).rgb,1.0), triangularize(interleaved_gradientNoise())).rgb,0.0,65000.);
gl_FragData[0].rgb = color; gl_FragData[0].rgb = color;
#endif #endif
} }

View File

@ -158,7 +158,7 @@ screen.Fog = Fog Settings
option.BLOOMY_FOG = Bloomy Fog Multiplier option.BLOOMY_FOG = Bloomy Fog Multiplier
option.Haze_amount = Atmospheric Haze Density option.Haze_amount = Atmospheric Haze Density
option.RainFog_amount = Rain Fog Multiplier option.RainFog_amount = Rain Fog Multiplier
option.RAYMARCH_CLOUDS_WITH_FOG = Render Clouds As Fog option.RAYMARCH_CLOUDS_WITH_FOG = Render Clouds As Fog §c(READ DESCRIPTION)§r
option.BorderFog = Chunk Border Fog option.BorderFog = Chunk Border Fog
screen.TOD_fog = Time Of Day Fog screen.TOD_fog = Time Of Day Fog
@ -592,7 +592,7 @@ screen.Fog.comment = Configure settings related to the raymarched volumetric fog
option.BLOOMY_FOG.comment = Configure the strength of bloom that is applied to fog. §bWhat is this?§r This effect makes the fog look soft, it helps hide a little noise too. can cause some visible flickering on detailed edges. §aPERFORMANCE COST:§r very low option.BLOOMY_FOG.comment = Configure the strength of bloom that is applied to fog. §bWhat is this?§r This effect makes the fog look soft, it helps hide a little noise too. can cause some visible flickering on detailed edges. §aPERFORMANCE COST:§r very low
option.Haze_amount.comment = Configure how dense the atmosphere around you is. §bWhat is this?§r This is the blue haze you see in the distance. option.Haze_amount.comment = Configure how dense the atmosphere around you is. §bWhat is this?§r This is the blue haze you see in the distance.
option.RainFog_amount.comment = Configure how dense the fog gets when it rains. option.RainFog_amount.comment = Configure how dense the fog gets when it rains.
option.RAYMARCH_CLOUDS_WITH_FOG.comment = Toggle detailed fog when you go within or around a cloud. §aPERFORMANCE COST:§r medium to high option.RAYMARCH_CLOUDS_WITH_FOG.comment = §cWARNING§r: This setting is experimental and not very well made! you will need to increase fog samples to make it match the normal clouds. Toggle detailed fog when you go within or around a cloud. §aPERFORMANCE COST:§r high.
option.BorderFog.comment = §bWhat is this?§r Toggle a fog that attempts to hide the chunks loading in. But because the sky is all over the place, it is difficult to do well. §aPERFORMANCE COST:§r very very low option.BorderFog.comment = §bWhat is this?§r Toggle a fog that attempts to hide the chunks loading in. But because the sky is all over the place, it is difficult to do well. §aPERFORMANCE COST:§r very very low
screen.TOD_fog.comment = Configure the density of fog that appears at specific times of the day. screen.TOD_fog.comment = Configure the density of fog that appears at specific times of the day.

View File

@ -148,6 +148,23 @@ vec4 GetVolumetricFog(
float atmosphereMult = 1.5; float atmosphereMult = 1.5;
#endif #endif
#ifdef RAYMARCH_CLOUDS_WITH_FOG
vec3 SkyLightColor = AmbientColor;
vec3 LightSourceColor = LightColor;
#ifdef ambientLight_only
LightSourceColor = vec3(0.0);
#endif
vec3 dV_Sun = WsunVec;
float mieDay = phaseg(SdotV, 0.85) + phaseg(SdotV, 0.75);
float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5);
vec3 directScattering = LightSourceColor * mieDay * 3.14;
vec3 directMultiScattering = LightSourceColor * mieDayMulti * 3.14 * 2.0;
#endif
float expFactor = 11.0; float expFactor = 11.0;
for (int i=0;i<SAMPLECOUNT;i++) { for (int i=0;i<SAMPLECOUNT;i++) {
float d = (pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT))/expFactor - 1.0/expFactor)/(1-1.0/expFactor); float d = (pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT))/expFactor - 1.0/expFactor)/(1-1.0/expFactor);
@ -179,6 +196,9 @@ vec4 GetVolumetricFog(
sh = vec3(shadow2D(shadow, shadowPos).x); sh = vec3(shadow2D(shadow, shadowPos).x);
#endif #endif
} }
#ifdef RAYMARCH_CLOUDS_WITH_FOG
vec3 sh_forClouds = sh;
#endif
#ifdef VL_CLOUDS_SHADOWS #ifdef VL_CLOUDS_SHADOWS
sh *= GetCloudShadow_VLFOG(progressW, WsunVec * lightCol.a); sh *= GetCloudShadow_VLFOG(progressW, WsunVec * lightCol.a);
@ -223,9 +243,66 @@ vec4 GetVolumetricFog(
color += (lighting - lighting * exp(-density*dd*dL))*absorbance; color += (lighting - lighting * exp(-density*dd*dL))*absorbance;
absorbance *= max(exp(-density*dd*dL),0.0); absorbance *= max(exp(-density*dd*dL),0.0);
if (absorbance < 1e-5) break; #ifdef RAYMARCH_CLOUDS_WITH_FOG
float otherlayer = max(progressW.y - (CloudLayer0_height+99.5), 0.0) > 0.0 ? 0.0 : 1.0;
float DUAL_MIN_HEIGHT = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
float DUAL_MAX_HEIGHT = DUAL_MIN_HEIGHT + 100.0;
float DUAL_DENSITY = otherlayer > 0.0 ? CloudLayer0_density : CloudLayer1_density;
if(clamp(progressW.y - DUAL_MAX_HEIGHT,0.0,1.0) < 1.0 && clamp(progressW.y - DUAL_MIN_HEIGHT,0.0,1.0) > 0.0){
#if defined CloudLayer1 && defined CloudLayer0
float upperLayerOcclusion = otherlayer > 0.0 ? GetCumulusDensity(1, progressW + vec3(0.0,1.0,0.0) * max((LAYER1_minHEIGHT+30) - progressW.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT) : 0.0;
float skylightOcclusion = mix(1.0, (1.0 - LAYER1_DENSITY)*0.8 + 0.2, (1.0 - exp2(-5.0 * (upperLayerOcclusion*upperLayerOcclusion))));
#else
float skylightOcclusion = 1.0;
#endif
float DUAL_MIN_HEIGHT_2 = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
float DUAL_MAX_HEIGHT_2 = DUAL_MIN_HEIGHT + 100.0;
float cumulus = GetCumulusDensity(-1, progressW, 1, CloudLayer0_height, CloudLayer1_height);
float fadedDensity = DUAL_DENSITY * pow(clamp((progressW.y - DUAL_MIN_HEIGHT_2)/25,0.0,1.0),2.0);
float muE = cumulus*fadedDensity;
float directLight = 0.0;
if(muE > 1e-5){
for (int j=0; j < 3; j++){
// vec3 shadowSamplePos = progressW + dV_Sun * (0.1 + j * (0.1 + dither.y*0.05));
vec3 shadowSamplePos = progressW + dV_Sun * (20.0 + j * (20.0 + dither.y*20.0));
float shadow = GetCumulusDensity(-1, shadowSamplePos, 0, DUAL_MIN_HEIGHT, DUAL_MAX_HEIGHT) * DUAL_DENSITY;
directLight += shadow;
}
/// shadows cast from one layer to another
/// large cumulus -> small cumulus
#if defined CloudLayer1 && defined CloudLayer0
if(otherlayer > 0.0) directLight += LAYER1_DENSITY * 2.0 * GetCumulusDensity(1, progressW + dV_Sun/abs(dV_Sun.y) * max((LAYER1_minHEIGHT+35) - progressW.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT);
#endif
// altostratus -> cumulus
#ifdef CloudLayer2
vec3 HighAlt_shadowPos = progressW + dV_Sun/abs(dV_Sun.y) * max(LAYER2_HEIGHT - progressW.y,0.0);
float HighAlt_shadow = GetAltostratusDensity(HighAlt_shadowPos) * CloudLayer2_density * (1.0-abs(WsunVec.y));
directLight += HighAlt_shadow;
#endif
float skyScatter = clamp(((DUAL_MAX_HEIGHT - progressW.y) / 100.0),0.0,1.0); // linear gradient from bottom to top of cloud layer
float distantfade = 1- exp( -10*pow(clamp(1.0 - length(progressW - cameraPosition)/(32*65),0.0,1.0),2));
vec3 cloudlighting = DoCloudLighting(DUAL_DENSITY * cumulus, SkyLightColor*skylightOcclusion, skyScatter, directLight, directScattering*sh_forClouds, directMultiScattering*sh_forClouds, 1);
color += max(cloudlighting - cloudlighting*exp(-muE*dd*dL_alternate),0.0) * absorbance;
absorbance *= max(exp(-muE*dd*dL_alternate),0.0);
}
}
#else
if (absorbance < 1e-5) break;
#endif
} }
// return vec4(color, dot(absorbance,vec3(0.21, 0.72, 0.07)));
return vec4(color, absorbance); return vec4(color, absorbance);
} }

View File

@ -153,7 +153,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
#define Stochastic_Transparent_Shadows #define Stochastic_Transparent_Shadows
#define Glass_Tint #define Glass_Tint
#define TRANSLUCENT_COLORED_SHADOWS // #define TRANSLUCENT_COLORED_SHADOWS
#ifdef TRANSLUCENT_COLORED_SHADOWS #ifdef TRANSLUCENT_COLORED_SHADOWS
#undef Stochastic_Transparent_Shadows #undef Stochastic_Transparent_Shadows
#endif #endif

View File

@ -84,8 +84,6 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
float Topshape = 0.0; float Topshape = 0.0;
float Baseshape = 0.0; float Baseshape = 0.0;
// float curvature = 1-exp(-25*pow(clamp(1.0 - length(pos - cameraPosition)/(32*80),0.0,1.0),2));
// curvature = clamp(1.0 - length(pos - cameraPosition)/(32*128),0.0,1.0);
float LAYER0_minHEIGHT_FOG = CloudLayer0_height; float LAYER0_minHEIGHT_FOG = CloudLayer0_height;
float LAYER0_maxHEIGHT_FOG = 100 + LAYER0_minHEIGHT_FOG; float LAYER0_maxHEIGHT_FOG = 100 + LAYER0_minHEIGHT_FOG;
LAYER0_minHEIGHT_FOG = LAYER0_minHEIGHT; LAYER0_minHEIGHT_FOG = LAYER0_minHEIGHT;
@ -115,12 +113,12 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
if(layer == -1){ if(layer == -1){
float otherlayer = max(pos.y - (LAYER0_minHEIGHT_FOG+99.5), 0.0) > 0 ? 0.0 : 1.0; float otherlayer = max(pos.y - (LAYER0_minHEIGHT_FOG+99.5), 0.0) > 0 ? 0.0 : 1.0;
if(otherlayer > 0.0){ if(otherlayer > 0.0){
SampleCoords0 = (samplePos.xz + cloud_movement) / 5000; SampleCoords0 = (samplePos.xz + cloud_movement) / 5000 ;
SampleCoords1 = (samplePos.xz - cloud_movement) / 500; SampleCoords1 = (samplePos.xz - cloud_movement) / 500 ;
CloudSmall = texture2D(noisetex, SampleCoords1 ).r; CloudSmall = texture2D(noisetex, SampleCoords1 ).r;
}else{ }else{
SampleCoords0 = -( (samplePos.zx + cloud_movement*2) / 15000); SampleCoords0 = -( (samplePos.zx + cloud_movement*2) / 10000);
SampleCoords1 = -( (samplePos.zx - cloud_movement*2) / 1500); SampleCoords1 = -( (samplePos.zx - cloud_movement*2) / 2500);
CloudSmall = texture2D(noisetex, SampleCoords1 ).b; CloudSmall = texture2D(noisetex, SampleCoords1 ).b;
} }
} }
@ -155,20 +153,17 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
if(layer == -1){ if(layer == -1){
#ifdef CloudLayer0 #ifdef CloudLayer0
float layer0_coverage = abs(CloudLarge*2.0 - 1.2)*0.5 - (1.0-CloudSmall); float layer0_coverage = abs(CloudLarge*2.0 - 1.2)*0.5 - (1.0-CloudSmall);
float layer0 = min(min(layer0_coverage + LAYER0_COVERAGE, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1)); float layer0 = min(min(layer0_coverage + LAYER0_COVERAGE, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1));
Topshape = max(pos.y - (LAYER0_maxHEIGHT_FOG - 75),0.0) / 200.0; Topshape = max(pos.y - (LAYER0_maxHEIGHT_FOG - 75),0.0) / 200.0;
Topshape += max(pos.y - (LAYER0_maxHEIGHT_FOG - 10),0.0) / 50.0; Topshape += max(pos.y - (LAYER0_maxHEIGHT_FOG - 10),0.0) / 15.0;
Baseshape = max(LAYER0_minHEIGHT_FOG + 12.5 - pos.y, 0.0) / 50.0; Baseshape = max(LAYER0_minHEIGHT_FOG + 12.5 - pos.y, 0.0) / 50.0;
FinalCloudCoverage += max(layer0 - Topshape - Baseshape,0.0); FinalCloudCoverage = max(layer0 - Topshape - Baseshape * (1.0-rainStrength),0.0);
#endif #endif
#ifdef CloudLayer1 #ifdef CloudLayer1
float layer1_coverage = abs(CloudLarge-0.8) - CloudSmall; float layer1_coverage = abs(CloudLarge-0.8) - CloudSmall;
float layer1 = min(min(layer1_coverage + LAYER1_COVERAGE - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1)); float layer1 = min(min(layer1_coverage + LAYER1_COVERAGE - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1));
@ -177,7 +172,7 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
Topshape += max(pos.y - (LAYER1_maxHEIGHT_FOG - 10 ), 0.0) / 50; Topshape += max(pos.y - (LAYER1_maxHEIGHT_FOG - 10 ), 0.0) / 50;
Baseshape = max(LAYER1_minHEIGHT_FOG + 12.5 - pos.y, 0.0) / 50.0; Baseshape = max(LAYER1_minHEIGHT_FOG + 12.5 - pos.y, 0.0) / 50.0;
FinalCloudCoverage += max(layer1 - Topshape - Baseshape, 0.0); FinalCloudCoverage += max(layer1 - Topshape*Topshape - Baseshape * (1.0-rainStrength), 0.0);
#endif #endif
} }
@ -246,9 +241,7 @@ vec3 DoCloudLighting(
float sunShadows, float sunShadows,
vec3 sunScatter, vec3 sunScatter,
vec3 sunMultiScatter, vec3 sunMultiScatter,
float distantfog, float distantfog
int layer
){ ){
float powder = 1.0 - exp(-10.0 * density); float powder = 1.0 - exp(-10.0 * density);
vec3 directLight = sunMultiScatter * exp(-3.0 * sunShadows) * powder + sunScatter * exp(-10.0 * sunShadows); vec3 directLight = sunMultiScatter * exp(-3.0 * sunShadows) * powder + sunScatter * exp(-10.0 * sunShadows);
@ -293,7 +286,7 @@ vec4 renderLayer(
#ifdef CLOUDS_INTERSECT_TERRAIN #ifdef CLOUDS_INTERSECT_TERRAIN
// thank you emin for this world intersection thing // thank you emin for this world intersection thing
#if defined DISTANT_HORIZONS #if defined DISTANT_HORIZONS
float maxdist = dhRenderDistance + 16 * 64; float maxdist = dhRenderDistance + 16 * 32;
#else #else
float maxdist = far + 16*5; float maxdist = far + 16*5;
#endif #endif
@ -328,7 +321,7 @@ if(layer == 2){
directLight += GetAltostratusDensity(shadowSamplePos_high) * cloudDensity * (1.0-abs(dV_Sun.y)); directLight += GetAltostratusDensity(shadowSamplePos_high) * cloudDensity * (1.0-abs(dV_Sun.y));
} }
vec3 lighting = DoCloudLighting(AltoWithDensity, skyLightCol, 0.5, directLight, sunScatter, sunMultiScatter, distantfog, layer); vec3 lighting = DoCloudLighting(AltoWithDensity, skyLightCol, 0.5, directLight, sunScatter, sunMultiScatter, distantfog);
COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION; COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION;
TOTAL_EXTINCTION *= max(exp(-mult*muE),0.0); TOTAL_EXTINCTION *= max(exp(-mult*muE),0.0);
@ -372,7 +365,7 @@ if(layer == 2){
/// shadows cast from one layer to another /// shadows cast from one layer to another
/// large cumulus -> small cumulus /// large cumulus -> small cumulus
#if defined CloudLayer1 && defined CloudLayer0 #if defined CloudLayer1 && defined CloudLayer0
if(layer == 0) directLight += LAYER1_DENSITY * 2.0 * GetCumulusDensity(1, rayProgress + dV_Sun/abs(dV_Sun.y) * max((LAYER1_minHEIGHT+70*dither) - rayProgress.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT); if(layer == 0) directLight += LAYER1_DENSITY * 2.0 * GetCumulusDensity(1, rayProgress + dV_Sun/abs(dV_Sun.y) * max((LAYER1_minHEIGHT+35) - rayProgress.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT);
#endif #endif
// altostratus -> cumulus // altostratus -> cumulus
#ifdef CloudLayer2 #ifdef CloudLayer2
@ -382,8 +375,7 @@ if(layer == 2){
#endif #endif
float skyScatter = clamp(((maxHeight - rayProgress.y) / 100.0),0.0,1.0); // linear gradient from bottom to top of cloud layer float skyScatter = clamp(((maxHeight - rayProgress.y) / 100.0),0.0,1.0); // linear gradient from bottom to top of cloud layer
vec3 lighting = DoCloudLighting(CumulusWithDensity, skyLightCol * skylightOcclusion, skyScatter, directLight, sunScatter, sunMultiScatter, distantfog, layer); vec3 lighting = DoCloudLighting(CumulusWithDensity, skyLightCol * skylightOcclusion, skyScatter, directLight, sunScatter, sunMultiScatter, distantfog);
COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION; COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION;
TOTAL_EXTINCTION *= max(exp(-mult*muE),0.0); TOTAL_EXTINCTION *= max(exp(-mult*muE),0.0);

View File

@ -111,7 +111,7 @@ alphaTest.gbuffers_water = false
alphaTest.gbuffers_skybasic = false alphaTest.gbuffers_skybasic = false
alphaTest.gbuffers_skytextured = false alphaTest.gbuffers_skytextured = false
sliders = MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_NORMAL_STRENGTH sliders = maxRayMarchSteps MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_NORMAL_STRENGTH
screen.columns=2 screen.columns=2
screen = \ screen = \
@ -234,7 +234,7 @@ BLISS_SHADERS <empty> \
screen.Clouds.columns = 3 screen.Clouds.columns = 3
screen.Clouds = VOLUMETRIC_CLOUDS CLOUDS_SHADOWS Cloud_Speed \ screen.Clouds = VOLUMETRIC_CLOUDS CLOUDS_SHADOWS Cloud_Speed \
CLOUDS_QUALITY CLOUD_SHADOW_STRENGTH Rain_coverage \ CLOUDS_QUALITY CLOUD_SHADOW_STRENGTH Rain_coverage \
<empty> [DAILY_WEATHER] <empty> \ maxRayMarchSteps [DAILY_WEATHER] <empty> \
CloudLayer0 CloudLayer1 CloudLayer2 \ CloudLayer0 CloudLayer1 CloudLayer2 \
CloudLayer0_coverage CloudLayer1_coverage CloudLayer2_coverage \ CloudLayer0_coverage CloudLayer1_coverage CloudLayer2_coverage \
CloudLayer0_density CloudLayer1_density CloudLayer2_density \ CloudLayer0_density CloudLayer1_density CloudLayer2_density \
@ -466,10 +466,10 @@ variable.float.modMood = playerMoodPercent - floor(playerMoodPercent)
# check if mood is increasing. # check if mood is increasing.
# and only activate when mood is above the threshold (5% mood) # and only activate when mood is above the threshold (5% mood)
# make sure it degenerates slow enough that mood can reach 5% after the mood flips to 0% from 100% # make sure it degenerates slow enough that mood can reach 5% after the mood flips to 0% from 100%
variable.bool.moodIsClimbing = smooth(if(modMood > 0.50 && playerMoodPercent > 5.0, 1.0, 0.0), 0.0, 100.0) > 0.1 variable.bool.moodIsClimbing = smooth(if(modMood > 0.50 && playerMoodPercent > 4.0, 1.0, eyeBrightness.x/240.0), 0.0, 10.0) > 0.1
# add one more check to turn it off when lightlevels are not zero # add one more check to turn it off when lightlevels are not zero
uniform.float.caveDetection = smooth(if(moodIsClimbing && eyeBrightness.y < 0.01, 1.0, 0.0), 1.0, 1.0) uniform.float.caveDetection = smooth(if(moodIsClimbing && eyeBrightness.y < 0.01, 1.0, 0.0), 3.0, 1.0)

View File

@ -56,7 +56,7 @@ void main() {
uint voxelId = uint(mc_Entity.x + 0.5); uint voxelId = uint(mc_Entity.x + 0.5);
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
if (voxelId == 0u && at_midBlock.w > 0) voxelId = BLOCK_LIGHT_1 + uint(at_midBlock.w - 1); if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1);
#endif #endif
if (voxelId == 0u) voxelId = 1u; if (voxelId == 0u) voxelId = 1u;

View File

@ -209,7 +209,7 @@ void main() {
) { ) {
uint voxelId = uint(blockId); uint voxelId = uint(blockId);
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
if (voxelId == 0u && at_midBlock.w > 0) voxelId = BLOCK_LIGHT_1 + uint(at_midBlock.w - 1); if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1);
#endif #endif
if (voxelId == 0u) voxelId = 1u; if (voxelId == 0u) voxelId = 1u;

View File

@ -56,7 +56,7 @@ void main() {
uint voxelId = uint(mc_Entity.x + 0.5); uint voxelId = uint(mc_Entity.x + 0.5);
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
if (voxelId == 0u && at_midBlock.w > 0) voxelId = BLOCK_LIGHT_1 + uint(at_midBlock.w - 1); if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1);
#endif #endif
if (voxelId == 0u) voxelId = 1u; if (voxelId == 0u) voxelId = 1u;