diff --git a/shaders/dimensions/DH_translucent.fsh b/shaders/dimensions/DH_translucent.fsh index c093b51..f0728c6 100644 --- a/shaders/dimensions/DH_translucent.fsh +++ b/shaders/dimensions/DH_translucent.fsh @@ -156,7 +156,7 @@ uniform int framemod8; vec3 rayTrace(vec3 dir, vec3 position, float dither, float fresnel) { - float biasAmount = 0.0000055; + float biasAmount = 0.000002; float quality = SSR_STEPS_DH; vec3 clipPosition = DH_toClipSpace3(position); @@ -181,7 +181,7 @@ vec3 rayTrace(vec3 dir, vec3 position, float dither, float fresnel) { float maxZ = spos.z; for (int i = 0; i <= int(quality); i++) { - float sampleDepth = sqrt(texelFetch2D(colortex4, ivec2(spos.xy / (texelSize * 4.0)), 0).a / 65000.0 - 1.0); + float sampleDepth = sqrt(texelFetch2D(colortex12, ivec2(spos.xy / (texelSize * 4.0)), 0).a / 65000.0); float sp = DH_inv_ld(sampleDepth); if (sp < max(minZ, maxZ) && sp > min(minZ, maxZ)) { @@ -421,14 +421,14 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) vec3 previousPosition = mat3(gbufferModelViewInverse) * DH_toScreenSpace(rtPos) + gbufferModelViewInverse[3].xyz + cameraPosition-previousCameraPosition; previousPosition = mat3(gbufferPreviousModelView) * previousPosition + gbufferPreviousModelView[3].xyz; previousPosition.xy = projMAD(dhPreviousProjection, previousPosition).xy / -previousPosition.z * 0.5 + 0.5; - if (previousPosition.x > 0.0 && previousPosition.y > 0.0 && previousPosition.x < 1.0 && previousPosition.x < 1.0) { + if (previousPosition.x > 0.0 && previousPosition.y > 0.0 && previousPosition.x < 1.0 && previousPosition.y < 1.0) { Reflections.a = 1.0; Reflections.rgb = texture2D(colortex5, previousPosition.xy).rgb; } } #endif #ifdef FORWARD_BACKGROUND_REFLECTION - BackgroundReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 1200.0; + BackgroundReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 1200.0; #endif #ifdef WATER_SUN_SPECULAR SunReflection = (DirectLightColor * Shadows) * GGX(normalize(normals), -normalize(viewPos), normalize(WsunVec2), roughness, f0) * (1.0-Reflections.a); diff --git a/shaders/dimensions/composite3.fsh b/shaders/dimensions/composite3.fsh index c5c78dc..fdfe207 100644 --- a/shaders/dimensions/composite3.fsh +++ b/shaders/dimensions/composite3.fsh @@ -804,7 +804,9 @@ bool isLightning = false; ////// --------------- BLEND FOG INTO SCENE //////////// apply VL fog over opaque and translucents - // bloomyFogMult *= temporallyFilteredVL.a; + #if !defined OVERWORLD_SHADER + bloomyFogMult *= temporallyFilteredVL.a; + #endif #if defined IS_IRIS // if(z >= 1.0) color = vec3(0,255,0); diff --git a/shaders/dimensions/composite5.fsh b/shaders/dimensions/composite5.fsh index c60bb00..0d36423 100644 --- a/shaders/dimensions/composite5.fsh +++ b/shaders/dimensions/composite5.fsh @@ -6,7 +6,7 @@ const int colortex0Format = RGBA16F; // low res clouds (deferred->composite2) const int colortex1Format = RGBA16; // terrain gbuffer (gbuffer->composite2) const int colortex2Format = RGBA16F; // forward + transparencies (gbuffer->composite4) const int colortex3Format = R11F_G11F_B10F; // frame buffer + bloom (deferred6->final) -const int colortex4Format = RGBA32F; // light values and skyboxes (everything) +const int colortex4Format = RGBA16F; // light values and skyboxes (everything) const int colortex6Format = R11F_G11F_B10F; // additionnal buffer for bloom (composite3->final) const int colortex7Format = RGBA8; // Final output, transparencies id (gbuffer->composite4) const int colortex8Format = RGBA8; // Specular Texture diff --git a/shaders/dimensions/deferred1.fsh b/shaders/dimensions/deferred1.fsh index b8e36ed..406fd49 100644 --- a/shaders/dimensions/deferred1.fsh +++ b/shaders/dimensions/deferred1.fsh @@ -23,9 +23,6 @@ float linZ(float depth) { float DH_ld(float dist) { return (2.0 * dhNearPlane) / (dhFarPlane + dhNearPlane - dist * (dhFarPlane - dhNearPlane)); } -float DH_ld_mixed(float dist) { - return (2.0 * near) / (dhFarPlane + near - dist * (dhFarPlane - near)); -} float DH_invLinZ (float lindepth){ return -((2.0*dhNearPlane/lindepth)-dhFarPlane-dhNearPlane)/(dhFarPlane-dhNearPlane); } @@ -64,20 +61,17 @@ void main() { float QuarterResDepth = texelFetch2D(dhDepthTex, ivec2(gl_FragCoord.xy*4), 0).x; if(newTex == 1.0) { float depth = DH_ld(QuarterResDepth); - gl_FragData[0] = vec4(oldTex, depth * depth * 65000.0 + 65000.0); + gl_FragData[0] = vec4(oldTex, 650000.0); gl_FragData[1].a = depth * depth * 65000.0; } else { - float depth = DH_ld_mixed(newTex); + float depth = linZ(newTex); gl_FragData[0] = vec4(oldTex, depth * depth * 65000.0); } // sky if (newTex == 1.0 && QuarterResDepth == 1.0) { - #ifdef CLOUD_SSR - gl_FragData[0] = vec4(oldTex, 120000.0); - #else gl_FragData[0] = vec4(oldTex, 650000.0); - #endif + gl_FragData[1].a = 650000.0; } #else if(newTex < 1.0) { @@ -85,11 +79,7 @@ void main() { gl_FragData[0] = vec4(oldTex, depth * depth * 65000.0); } else { // sky - #ifdef CLOUD_SSR - gl_FragData[0] = vec4(oldTex, 64000.0); - #else gl_FragData[0] = vec4(oldTex, 650000.0); - #endif } #endif } \ No newline at end of file diff --git a/shaders/dimensions/final.fsh b/shaders/dimensions/final.fsh index 88de83c..b5a3b05 100644 --- a/shaders/dimensions/final.fsh +++ b/shaders/dimensions/final.fsh @@ -15,8 +15,7 @@ uniform sampler2D shadowcolor1; #extension GL_ARB_shader_image_load_store : enable #extension GL_EXT_shader_image_load_store : enable - layout (rgba32f) uniform image2D cloudDepthTex; -#endif + layout (rgba16f) uniform image2D cloudDepthTex; varying vec2 texcoord; uniform vec2 texelSize; diff --git a/shaders/lib/color_transforms.glsl b/shaders/lib/color_transforms.glsl index 99daa72..850f4e2 100644 --- a/shaders/lib/color_transforms.glsl +++ b/shaders/lib/color_transforms.glsl @@ -373,4 +373,8 @@ vec3 ToneMap_AgX_minimal_merlin( vec3 color ) { color = clamp( color, 0.0, 1.0 ); return color; +} + +vec3 no_tonemapper(vec3 color){ + return color; } \ No newline at end of file diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index 98e6d03..47f40bb 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -35,8 +35,6 @@ #define USE_QUARTER_RES_DEPTH #define SNELLS_WINDOW -// #define CLOUD_SSR - //////////////////////////////////////// // ----- PLANT RELATED SETTINGS ----- // //////////////////////////////////////// @@ -610,7 +608,7 @@ uniform int moonPhase; // ----- COLOR/POST PROCESSING RELATED SETTINGS ----- // //////////////////////////////////////////////////////// -#define TONEMAP ToneMap_AgX_minimal_merlin // [ToneMap_AgX_minimal_merlin ToneMap_AgX_minimal ToneMap_AgX ToneMap_Hejl2015 Tonemap_Xonk Tonemap_Uchimura HableTonemap Full_Reinhard_Edit Tonemap_Full_Reinhard reinhard Tonemap_Lottes ACESFilm] +#define TONEMAP ToneMap_AgX_minimal_merlin // [no_tonemapper ToneMap_AgX_minimal_merlin ToneMap_AgX_minimal ToneMap_AgX ToneMap_Hejl2015 Tonemap_Xonk Tonemap_Uchimura HableTonemap Full_Reinhard_Edit Tonemap_Full_Reinhard reinhard Tonemap_Lottes ACESFilm] //#define USE_ACES_COLORSPACE_APPROXIMATION #define CONTRAST_ADAPTATIVE_SHARPENING diff --git a/shaders/lib/specular.glsl b/shaders/lib/specular.glsl index 9d96dab..df76eff 100644 --- a/shaders/lib/specular.glsl +++ b/shaders/lib/specular.glsl @@ -1,12 +1,12 @@ -#ifdef DISTANT_HORIZONS - float invLinZ (float lindepth){ +#if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS + float invLinZ_DH (float lindepth){ return -((2.0*near/lindepth)-dhFarPlane-near)/(dhFarPlane-near); } -#else +#endif + float invLinZ (float lindepth){ return -((2.0*near/lindepth)-far-near)/(far-near); } -#endif float linZ(float depth) { return (2.0 * near) / (far + near - depth * (far - near)); @@ -103,7 +103,7 @@ float shlickFresnelRoughness(float XdotN, float roughness){ return shlickFresnel; } -vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, bool hand, inout float reflectionLength, float fresnel){ +vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, bool hand, inout float reflectionLength){ float biasAmount = 0.000075; @@ -111,6 +111,7 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo float rayLength = ((position.z + dir.z * far*sqrt(3.)) > -near) ? (-near -position.z) / dir.z : far*sqrt(3.); vec3 direction = toClipSpace3(position + dir*rayLength) - clipPosition; //convert to clip space + vec3 reflectedTC = vec3((direction.xy + clipPosition.xy) * RENDER_SCALE, 1.0); //get at which length the ray intersects with the edge of the screen vec3 maxLengths = (step(0.0, direction) - clipPosition) / direction; @@ -121,6 +122,7 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo stepv.xy *= RENDER_SCALE; vec3 spos = clipPosition + stepv*dither; + spos += stepv*0.5 + vec3(0.5*texelSize,0.0); // small offsets to reduce artifacts from precision differences. #if defined DEFERRED_SPECULAR && defined TAA spos.xy += TAA_Offset*texelSize*0.5/RENDER_SCALE; @@ -129,14 +131,18 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo float minZ = spos.z - 0.00025 / linZ(spos.z);; float maxZ = spos.z; - float sp = 0.0; + vec3 hitPos = vec3(1.1); for (int i = 0; i <= int(quality); i++) { + if(spos.x < 0 || spos.x > 1 || spos.y < 0 || spos.y > 1) return hitPos; - float sampleDepth = texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4.0),0).a/65000.0; - sp = invLinZ(sqrt(sampleDepth)); + float sampleDepth = texelFetch2D(colortex4, ivec2(spos.xy/texelSize/4.0),0).a/65000.0; + float sp = invLinZ(sqrt(sampleDepth)); - if(sp < max(minZ, maxZ) && sp > min(minZ, maxZ) && sampleDepth <= 1.0) return vec3(spos.xy/RENDER_SCALE,sp); + if(sp < max(minZ, maxZ) && sp > min(minZ, maxZ) && sampleDepth <= 1.0) { + hitPos = vec3(spos.xy/RENDER_SCALE, sp); + break; + } minZ = maxZ - biasAmount / linZ(spos.z); maxZ += stepv.z; @@ -145,7 +151,9 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo reflectionLength += 1.0 / quality; } - return vec3(1.1); + + if(hand) return reflectedTC; + return hitPos; } #if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS @@ -159,14 +167,15 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo return projMAD(combined_projection_matrix, viewSpacePosition) / -viewSpacePosition.z * 0.5 + 0.5; } - vec3 rayTraceSpeculars_DH(vec3 dir, vec3 position, float dither, float quality, bool hand, inout float reflectionLength, float fresnel){ + vec3 rayTraceSpeculars_DH(vec3 dir, vec3 position, float dither, float quality, bool hand, inout float reflectionLength){ - float biasAmount = 0.000025; + float biasAmount = 0.000015; vec3 clipPosition = toClipSpace3_DH(position); float rayLength = ((position.z + dir.z * dhFarPlane*sqrt(3.)) > -near) ? (-near -position.z) / dir.z : dhFarPlane*sqrt(3.); vec3 direction = toClipSpace3_DH(position + dir*rayLength) - clipPosition; //convert to clip space + vec3 reflectedTC = vec3((direction.xy + clipPosition.xy) * RENDER_SCALE, 1.0); //get at which length the ray intersects with the edge of the screen vec3 maxLengths = (step(0.0, direction) - clipPosition) / direction; @@ -177,6 +186,7 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo stepv.xy *= RENDER_SCALE; vec3 spos = clipPosition + stepv*dither; + spos += stepv*0.5 + vec3(0.5*texelSize,0.0); // small offsets to reduce artifacts from precision differences. #if defined DEFERRED_SPECULAR && defined TAA spos.xy += TAA_Offset*texelSize*0.5/RENDER_SCALE; @@ -185,19 +195,19 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo float minZ = spos.z - 0.00025 / linZ(spos.z);; float maxZ = spos.z; - float sp = 0.0; + vec3 hitPos = vec3(1.1); - float sampleDepth_DH = 0.0; for (int i = 0; i <= int(quality); i++) { + if(spos.x < 0 || spos.x > 1 || spos.y < 0 || spos.y > 1) return hitPos; - float sampleDepth = texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4.0),0).a/65000.0; - if (sampleDepth >= 1.0) { - sampleDepth_DH = sampleDepth; - sampleDepth -= 1.0; - } - sp = invLinZ(sqrt(sampleDepth)); + float sampleDepth = texelFetch2D(colortex12,ivec2(spos.xy/texelSize/4.0),0).a/65000.0; + + float sp = invLinZ_DH(sqrt(sampleDepth)); - if(sp < max(minZ, maxZ) && sp > min(minZ, maxZ) && sampleDepth_DH >= 1.0) return vec3(spos.xy/RENDER_SCALE,sp); + if(sp < max(minZ, maxZ) && sp > min(minZ, maxZ) && sampleDepth <= 1.0) { + hitPos = vec3(spos.xy/RENDER_SCALE, sp); + break; + } minZ = maxZ - biasAmount / linZ(spos.z); maxZ += stepv.z; @@ -207,7 +217,8 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo reflectionLength += 1.0 / quality; } - return vec3(1.1); + if(hand) return reflectedTC; + return hitPos; } #endif @@ -218,7 +229,7 @@ vec4 screenSpaceReflections( bool isHand, float roughness, - float fresnel + inout float backgroundReflectMask ){ vec4 reflection = vec4(0.0); @@ -226,35 +237,35 @@ vec4 screenSpaceReflections( float reflectionLength = 0.0; float quality = SSR_STEPS; - vec3 raytracePos = rayTraceSpeculars(reflectedVector, viewPos, noise, quality, isHand, reflectionLength, fresnel); + vec3 raytracePos = rayTraceSpeculars(reflectedVector, viewPos, noise, quality, isHand, reflectionLength); #if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS - if (raytracePos.z >= 1.0) { - vec3 raytracePos_DH = rayTraceSpeculars_DH(reflectedVector, viewPos, noise, SSR_STEPS_DH, isHand, reflectionLength, fresnel); + if (raytracePos.z > 1.0) { + vec3 raytracePos_DH = rayTraceSpeculars_DH(reflectedVector, viewPos, noise, SSR_STEPS_DH, isHand, reflectionLength); raytracePos = raytracePos_DH; } #endif - if (raytracePos.z >= 1.0) return reflection; + if (raytracePos.z > 1.0) return reflection; // use higher LOD as the reflection goes on, to blur it. this helps denoise a little. - float value = 0.1; - reflectionLength = min(max(reflectionLength - value, 0.0)/(1.0-value), 1.0); + reflectionLength = min(max(reflectionLength - 0.1, 0.0)/0.9, 1.0); float LOD = mix(0.0, 6.0*(1.0-exp(-15.0*sqrt(roughness))), 1.0-pow(1.0-reflectionLength,5.0)); - // float LOD = mix(0.0, 6.0*pow(roughness,0.1), 1.0-pow(1.0-reflectionLength,5.0)); - // float LOD = clamp(pow(reflectionLength, pow(1.0-sqrt(roughness),5.0) * 3.0) * 6.0, 0.0, 6.0*pow(roughness,0.1)); vec3 previousPosition = mat3(gbufferModelViewInverse) * toScreenSpace(raytracePos) + gbufferModelViewInverse[3].xyz + (cameraPosition - previousCameraPosition); previousPosition = mat3(gbufferPreviousModelView) * previousPosition + gbufferPreviousModelView[3].xyz; previousPosition.xy = projMAD(gbufferPreviousProjection, previousPosition).xy / -previousPosition.z * 0.5 + 0.5; - // fix UV pos dragging behind due to hand not having a good previous frame position. - previousPosition.xy = isHand ? raytracePos.xy : previousPosition.xy; - if (previousPosition.x > 0.0 && previousPosition.y > 0.0 && previousPosition.x < 1.0 && previousPosition.y < 1.0) { + if(raytracePos.z > 0.9999999) backgroundReflectMask = 1.0; + + #if defined OVERWORLD_SHADER + reflection.a = raytracePos.z > 0.9999999 ? (isHand || isEyeInWater == 1 ? 1.0 : 0.0) : 1.0; + #else reflection.a = 1.0; + #endif #ifdef FORWARD_RENDERED_SPECULAR // vec2 clampedRes = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.)); @@ -265,7 +276,6 @@ vec4 screenSpaceReflections( #else reflection.rgb = texture2DLod(colortex5, previousPosition.xy, LOD).rgb; #endif - } // reflection.rgb = vec3(LOD/6); @@ -385,8 +395,6 @@ vec3 specularReflections( vec3 samplePoints = SampleVNDFGGX(viewDir, roughness, noise.xy); vec3 reflectedVector_L = basis * reflect(-normalize(viewDir), samplePoints); - // get reflectance and f0/HCM values - // float shlickFresnel = pow(clamp(1.0 + dot(-reflectedVector, samplePoints),0.0,1.0),5.0); reflectedVector_L = isHand ? reflect(playerPos, normal) : reflectedVector_L; #else vec3 reflectedVector_L = reflect(playerPos, normal); @@ -420,6 +428,8 @@ vec3 specularReflections( #if defined DEFERRED_BACKGROUND_REFLECTION || defined FORWARD_BACKGROUND_REFLECTION || defined DEFERRED_ENVIORNMENT_REFLECTION || defined FORWARD_ENVIORNMENT_REFLECTION if(reflectionVisibilty < 1.0){ + + float backgroundReflectMask = lightmap; #if defined DEFERRED_BACKGROUND_REFLECTION || defined FORWARD_BACKGROUND_REFLECTION #if !defined OVERWORLD_SHADER && !defined FORWARD_SPECULAR @@ -432,7 +442,7 @@ vec3 specularReflections( #endif #if defined DEFERRED_ENVIORNMENT_REFLECTION || defined FORWARD_ENVIORNMENT_REFLECTION - enviornmentReflection = screenSpaceReflections(mat3(gbufferModelView) * reflectedVector_L, viewPos, noise.y, isHand, roughness, shlickFresnel); + enviornmentReflection = screenSpaceReflections(mat3(gbufferModelView) * reflectedVector_L, viewPos, noise.z, isHand, roughness, backgroundReflectMask); // darkening for metals. vec3 DarkenedDiffuseLighting = isMetal ? diffuseLighting * (1.0-enviornmentReflection.a) * (1.0-lightmap) : diffuseLighting; #else @@ -442,7 +452,7 @@ vec3 specularReflections( // composite all the different reflections together #if defined DEFERRED_BACKGROUND_REFLECTION || defined FORWARD_BACKGROUND_REFLECTION - specularReflections = mix(DarkenedDiffuseLighting, backgroundReflection, lightmap); + specularReflections = mix(DarkenedDiffuseLighting, backgroundReflection, backgroundReflectMask); #endif #if defined DEFERRED_ENVIORNMENT_REFLECTION || defined FORWARD_ENVIORNMENT_REFLECTION diff --git a/shaders/lib/volumetricClouds.glsl b/shaders/lib/volumetricClouds.glsl index 146d798..a07427e 100644 --- a/shaders/lib/volumetricClouds.glsl +++ b/shaders/lib/volumetricClouds.glsl @@ -35,7 +35,7 @@ float lightningFlash = mix(0.1, 2.5, randomSeed); #extension GL_ARB_shader_image_load_store : enable #extension GL_EXT_shader_image_load_store : enable - layout (rgba32f) uniform image2D cloudDepthTex; + layout (rgba16f) uniform image2D cloudDepthTex; float lightningStart = mix(20.0, 1.0, smoothstep(0.0, 0.085, timeInLightning)); float lightningMid = smoothstep(0.0, 0.05, timeInLightning) * smoothstep(0.15, 0.066, timeInLightning); diff --git a/shaders/shaders.properties b/shaders/shaders.properties index 23c5d5b..43c78e6 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -64,7 +64,7 @@ iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUS customTexture.lightningTex15 = texture/lightning/lightning15.png customTexture.lightningTex16 = texture/lightning/lightning16.png - image.cloudDepthTex = cSampler1 rgba rgba32f float true true 1.0 1.0 + image.cloudDepthTex = cSampler1 rgba rgba16f float true true 1.0 1.0 #endif #ifdef LPV_ENABLED @@ -427,7 +427,7 @@ SHADER_VERSION_LABEL \ ######## MISC SETTINGS screen.Misc_Settings = [EXPERIMENTAL_STUFF] DEBUG_VIEW [the_end_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES LIGHTING_EFFECTS_BLUR_FILTER [selection_box_outline] ISOLATE_RESOURCEPACK_SKY [scene_controller] - screen.EXPERIMENTAL_STUFF = CAVE_DETECTION BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER HYPER_DETAILED_WAVES OLD_BLOOM PLANET_GROUND_BRIGHTNESS LIT_PARTICLE_BRIGHTNESS WATER_CAUSTICS_BRIGHTNESS WATER_CAUSTICS_POWER OLD_CAVE_DETECTION FORCE_TRANSLUCENT_GLASS LARGE_WAVE_DISPLACEMENT OLD_INDIRECT_SSS CLOUD_SSR Vanilla_like_water + screen.EXPERIMENTAL_STUFF = CAVE_DETECTION BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER HYPER_DETAILED_WAVES OLD_BLOOM PLANET_GROUND_BRIGHTNESS LIT_PARTICLE_BRIGHTNESS WATER_CAUSTICS_BRIGHTNESS WATER_CAUSTICS_POWER OLD_CAVE_DETECTION FORCE_TRANSLUCENT_GLASS LARGE_WAVE_DISPLACEMENT OLD_INDIRECT_SSS Vanilla_like_water screen.the_end_orb.columns = 1 screen.the_end_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B @@ -674,13 +674,13 @@ variable.float.exitedBiomePos_Y = smooth(cameraPosition.y, freezeCameraPos, free variable.float.exitedBiomePos_Z = smooth(cameraPosition.z, freezeCameraPos, freezeCameraPos) variable.vec3.VARexitedBiomePos = vec3(exitedBiomePos_X, exitedBiomePos_Y, exitedBiomePos_Z) -#ifdef DROWNING_EFFECT -uniform.float.drowningSmooth = smooth(if(currentPlayerAir < 0.01, 0.0, 1.0), 6.0, 12.0) -#endif - variable.float.distanceTreshold = 200.0 variable.bool.checkDistanceEpislonFromExitPos = equals(cameraPosition.x, VARexitedBiomePos.x, distanceTreshold) && equals(cameraPosition.y, VARexitedBiomePos.y, distanceTreshold) && equals(cameraPosition.z, VARexitedBiomePos.z, distanceTreshold) +#ifdef DROWNING_EFFECT + uniform.float.drowningSmooth = smooth(if(currentPlayerAir < 0.01, 0.0, 1.0), 6.0, 12.0) +#endif + # photon stuff uniform.vec2.view_res = vec2(viewWidth, viewHeight) uniform.vec2.view_pixel_size = vec2(1.0 / viewWidth, 1.0 / viewHeight) @@ -792,5 +792,5 @@ uniform.float.combined_near = near uniform.float.combined_far = dhFarPlane uniform.vec4.combined_projection_matrix_0 = vec4(gbufferProjection.0.0, 0.0, 0.0, 0.0) uniform.vec4.combined_projection_matrix_1 = vec4(0.0, gbufferProjection.1.1, 0.0, 0.0) -uniform.vec4.combined_projection_matrix_2 = vec4(gbufferProjection.2.0, gbufferProjection.2.1, (combined_far + combined_near) / (combined_near - combined_far), 0.0) -uniform.vec4.combined_projection_matrix_3 = vec4(0.0, 0.0, (2.0 * combined_far * combined_near) / (combined_near - combined_far), 0.0) \ No newline at end of file +uniform.vec4.combined_projection_matrix_2 = vec4(gbufferProjection.2.0, gbufferProjection.2.1, -((near + dhFarPlane) / (dhFarPlane - near)), 0.0) +uniform.vec4.combined_projection_matrix_3 = vec4(0.0, 0.0, -((2.0 * dhFarPlane * near) / (dhFarPlane - near)), 0.0) \ No newline at end of file