From 201ee55b9b6515451c5859a3da78f7eb3416fff0 Mon Sep 17 00:00:00 2001 From: Xonk Date: Sat, 2 Mar 2024 18:53:51 -0500 Subject: [PATCH] tweak dirt_amount settings. add HYPER DETAILED WAVE misc setting --- shaders/dimensions/all_translucent.fsh | 2 +- shaders/dimensions/composite1.fsh | 2 +- shaders/dimensions/composite2.fsh | 2 +- shaders/dimensions/composite3.fsh | 2 +- shaders/dimensions/deferred3.fsh | 392 ------------------ shaders/dimensions/deferred3.vsh | 48 --- .../dimensions/fogBehindTranslucent_pass.fsh | 2 +- shaders/lib/settings.glsl | 1 + shaders/lib/waterBump.glsl | 6 +- shaders/shaders.properties | 2 +- 10 files changed, 12 insertions(+), 447 deletions(-) delete mode 100644 shaders/dimensions/deferred3.fsh delete mode 100644 shaders/dimensions/deferred3.vsh diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index 9b63fd9..7fd293c 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -380,7 +380,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) if (iswater > 0.95){ vec3 posxz = feetPlayerPos + cameraPosition; - float bumpmult = WATER_WAVE_STRENGTH; + float bumpmult = 1.0; posxz.xyz = getParallaxDisplacement(posxz) ; diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index a6aa670..3efb317 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -817,7 +817,7 @@ void main() { ////// --------------- COLORS --------------- ////// - float dirtAmount = Dirt_Amount; + float dirtAmount = Dirt_Amount + 0.01; vec3 waterEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B); vec3 dirtEpsilon = vec3(Dirt_Absorb_R, Dirt_Absorb_G, Dirt_Absorb_B); vec3 totEpsilon = dirtEpsilon*dirtAmount + waterEpsilon; diff --git a/shaders/dimensions/composite2.fsh b/shaders/dimensions/composite2.fsh index 656e161..e5a26e6 100644 --- a/shaders/dimensions/composite2.fsh +++ b/shaders/dimensions/composite2.fsh @@ -363,7 +363,7 @@ void main() { - float dirtAmount = Dirt_Amount; + float dirtAmount = Dirt_Amount + 0.01; vec3 waterEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B); vec3 dirtEpsilon = vec3(Dirt_Absorb_R, Dirt_Absorb_G, Dirt_Absorb_B); vec3 totEpsilon = dirtEpsilon*dirtAmount + waterEpsilon; diff --git a/shaders/dimensions/composite3.fsh b/shaders/dimensions/composite3.fsh index 2011d02..21a6b20 100644 --- a/shaders/dimensions/composite3.fsh +++ b/shaders/dimensions/composite3.fsh @@ -372,7 +372,7 @@ void main() { ////// --------------- underwater fog if (isEyeInWater == 1){ - float dirtAmount = Dirt_Amount; + float dirtAmount = Dirt_Amount + 0.01; vec3 waterEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B); vec3 dirtEpsilon = vec3(Dirt_Absorb_R, Dirt_Absorb_G, Dirt_Absorb_B); vec3 totEpsilon = dirtEpsilon*dirtAmount + waterEpsilon; diff --git a/shaders/dimensions/deferred3.fsh b/shaders/dimensions/deferred3.fsh deleted file mode 100644 index eb7b08a..0000000 --- a/shaders/dimensions/deferred3.fsh +++ /dev/null @@ -1,392 +0,0 @@ -#include "/lib/settings.glsl" - -flat varying vec4 lightCol; -flat varying vec3 averageSkyCol; -// flat varying vec3 averageSkyCol_Clouds; - -uniform sampler2D noisetex; -uniform sampler2D depthtex0; -uniform sampler2D depthtex1; -uniform sampler2D dhDepthTex; -uniform sampler2D dhDepthTex1; - -uniform sampler2D colortex2; -uniform sampler2D colortex3; -// uniform sampler2D colortex4; -uniform sampler2D colortex6; - -flat varying vec3 WsunVec; -uniform vec3 sunVec; -uniform float sunElevation; - -// uniform float far; -uniform float dhFarPlane; -uniform float dhNearPlane; - -uniform int frameCounter; -uniform float frameTimeCounter; - -// varying vec2 texcoord; -uniform vec2 texelSize; -// flat varying vec2 TAA_Offset; - -uniform int isEyeInWater; -uniform float rainStrength; -uniform ivec2 eyeBrightnessSmooth; -uniform float eyeAltitude; - -#define DHVLFOG -#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z) -#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz) - -#include "/lib/color_transforms.glsl" -#include "/lib/color_dither.glsl" -#include "/lib/projections.glsl" -#include "/lib/res_params.glsl" -#include "/lib/sky_gradient.glsl" -#include "/lib/Shadow_Params.glsl" - -#include "/lib/DistantHorizons_projections.glsl" - -float DH_ld(float dist) { - return (2.0 * dhNearPlane) / (dhFarPlane + dhNearPlane - dist * (dhFarPlane - dhNearPlane)); -} -float DH_inv_ld (float lindepth){ - return -((2.0*dhNearPlane/lindepth)-dhFarPlane-dhNearPlane)/(dhFarPlane-dhNearPlane); -} - -float linearizeDepthFast(const in float depth, const in float near, const in float far) { - return (near * far) / (depth * (near - far) + far); -} - - -#ifdef OVERWORLD_SHADER - const bool shadowHardwareFiltering = true; - uniform sampler2DShadow shadow; - - flat varying vec3 refractedSunVec; - - #define TIMEOFDAYFOG - #include "/lib/lightning_stuff.glsl" - #include "/lib/volumetricClouds.glsl" - #include "/lib/overworld_fog.glsl" -#endif -#ifdef NETHER_SHADER - uniform sampler2D colortex4; - #include "/lib/nether_fog.glsl" -#endif -#ifdef END_SHADER - uniform sampler2D colortex4; - #include "/lib/end_fog.glsl" -#endif - -#define fsign(a) (clamp((a)*1e35,0.,1.)*2.-1.) - -float interleaved_gradientNoise(){ - return fract(52.9829189*fract(0.06711056*gl_FragCoord.x + 0.00583715*gl_FragCoord.y)+ 1.0/1.6180339887 * frameCounter); -} -float blueNoise(){ - return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a+ 1.0/1.6180339887 * frameCounter ); -} -float R2_dither(){ - vec2 coord = gl_FragCoord.xy + (frameCounter%40000) * 2.0; - vec2 alpha = vec2(0.75487765, 0.56984026); - return fract(alpha.x * coord.x + alpha.y * coord.y ) ; -} -void waterVolumetrics_notoverworld(inout vec3 inColor, vec3 rayStart, vec3 rayEnd, float estEndDepth, float estSunDepth, float rayLength, float dither, vec3 waterCoefs, vec3 scatterCoef, vec3 ambient){ - inColor *= exp(-rayLength * waterCoefs); //No need to take the integrated value - - int spCount = rayMarchSampleCount; - vec3 start = toShadowSpaceProjected(rayStart); - vec3 end = toShadowSpaceProjected(rayEnd); - vec3 dV = (end-start); - //limit ray length at 32 blocks for performance and reducing integration error - //you can't see above this anyway - float maxZ = min(rayLength,12.0)/(1e-8+rayLength); - dV *= maxZ; - - - rayLength *= maxZ; - - float dY = normalize(mat3(gbufferModelViewInverse) * rayEnd).y * rayLength; - estEndDepth *= maxZ; - estSunDepth *= maxZ; - - vec3 wpos = mat3(gbufferModelViewInverse) * rayStart + gbufferModelViewInverse[3].xyz; - vec3 dVWorld = (wpos-gbufferModelViewInverse[3].xyz); - - vec3 absorbance = vec3(1.0); - vec3 vL = vec3(0.0); - - float expFactor = 11.0; - for (int i=0;i 1e-5)*2.0 - 1.0; - lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb; - - WsunVec = lightCol.a * normalize(mat3(gbufferModelViewInverse) * sunPosition); - // WsunVec = normalize(LightDir); - - refractedSunVec = refract(WsunVec, -vec3(0.0,1.0,0.0), 1.0/1.33333); -} diff --git a/shaders/dimensions/fogBehindTranslucent_pass.fsh b/shaders/dimensions/fogBehindTranslucent_pass.fsh index 0734b87..5407ce3 100644 --- a/shaders/dimensions/fogBehindTranslucent_pass.fsh +++ b/shaders/dimensions/fogBehindTranslucent_pass.fsh @@ -389,7 +389,7 @@ void main() { vec3 playerPos = normalize(mat3(gbufferModelViewInverse) * viewPos1); // vec3 lightningColor = (lightningEffect / 3) * (max(eyeBrightnessSmooth.y,0)/240.); - float dirtAmount = Dirt_Amount + 0.1; + float dirtAmount = Dirt_Amount + 0.05; vec3 waterEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B); vec3 dirtEpsilon = vec3(Dirt_Absorb_R, Dirt_Absorb_G, Dirt_Absorb_B); vec3 totEpsilon = dirtEpsilon*dirtAmount + waterEpsilon; diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index 92a74e0..4b72401 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -634,6 +634,7 @@ uniform int moonPhase; #define WATER_CAUSTICS_BRIGHTNESS 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0] #define DENOISE_SSS_AND_SSAO +// #define HYPER_DETAILED_WAVES /////////////////////////////////////////// // ----- DISTANT HORIZONS SETTINGS ----- // /////////////////////////////////////////// diff --git a/shaders/lib/waterBump.glsl b/shaders/lib/waterBump.glsl index 7877481..907d321 100644 --- a/shaders/lib/waterBump.glsl +++ b/shaders/lib/waterBump.glsl @@ -59,13 +59,17 @@ vec3 getWaveNormal(vec3 posxz, bool isLOD){ // vary the normal's "smooth" factor as distance changes, to avoid noise from too much details. float range = pow(clamp(1.0 - length(posxz - cameraPosition)/(32*4),0.0,1.0),2.0); float deltaPos = mix(0.5, 0.1, range); - float normalMult = 10.0; + float normalMult = 10.0 * WATER_WAVE_STRENGTH; if(isLOD){ normalMult = mix(5.0, normalMult, range); deltaPos = mix(0.9, deltaPos, range); } + #ifdef HYPER_DETAILED_WAVES + deltaPos = 0.025; + #endif + vec2 coord = posxz.xz;// - posxz.y; float h0 = getWaterHeightmap(coord); diff --git a/shaders/shaders.properties b/shaders/shaders.properties index 31b93a3..0b2bafa 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -290,7 +290,7 @@ BLISS_SHADERS \ ######## MISC SETTINGS - screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only Glass_Tint LIGHTNING_FLASH HURT_AND_DEATH_EFFECT LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INFRONT_OF_WORLD SELECT_BOX DENOISE_SSS_AND_SSAO WATER_CAUSTICS_BRIGHTNESS + screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only Glass_Tint LIGHTNING_FLASH HURT_AND_DEATH_EFFECT LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INFRONT_OF_WORLD SELECT_BOX DENOISE_SSS_AND_SSAO WATER_CAUSTICS_BRIGHTNESS HYPER_DETAILED_WAVES screen.the_orb.columns = 1 screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B