remove ripple fix, add new ripple strength option

This commit is contained in:
Merlin1809
2025-06-19 12:57:01 +02:00
parent 7d0980ab39
commit 66bd96ab5f
6 changed files with 11 additions and 8 deletions
+4 -4
View File
@@ -539,7 +539,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
vec2 lightmap = lmtexcoord.zw;
#if !defined HAND
if (isWater){
vec3 playerPos = (mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz);
vec3 playerPos = shadowPlayerPos;
vec3 waterPos = playerPos;
vec3 flowDir = normalize(worldSpaceNormal*10.0) * frameTimeCounter * 2.0 * WATER_WAVE_SPEED;
@@ -552,11 +552,11 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
waterPos.xyz = getParallaxDisplacement(waterPos, playerPos);
#ifdef RIPPLE_WATER
float effectStrength = smoothstep(0.85, 1.0, max(lightmap.y-step(1.0,lightmap.x), 0.0));
float effectStrength = smoothstep(0.85, 1.0, lightmap.y);
if(viewDist < 35 && waterPos.y <= 0.0) {
if(viewDist < 35) {
rippleBump = ripples(feetPlayerPos.xz+cameraPosition.xz);
waterPos.xyz += 14 * rippleBump * rainStrength * effectStrength * smoothstep(35, 10, viewDist);
waterPos.xyz += RIPPLE_STRENGTH * rippleBump * rainStrength * effectStrength * smoothstep(35, 10, viewDist);
}
#endif
+2 -1
View File
@@ -711,7 +711,8 @@ uniform float wetness;
void applyPuddles(
in vec3 worldPos, in vec3 flatNormals, in vec2 lightmap, in bool isWater, in int isEyeInWater, inout vec3 albedo, inout vec3 normals, inout float roughness, inout float f0
){
float effectStrength = smoothstep(0.85, 1.0, max(lightmap.y-step(1.0,lightmap.x), 0.0));
float effectStrength = smoothstep(0.85, 1.0, lightmap.y);
//float effectStrength = smoothstep(0.85, 1.0, max(lightmap.y-step(1.0,lightmap.x), 0.0));
vec2 snowCoords = worldPos.xz*0.1;
#if ShaderSnow > 0 || defined Puddles
+2 -1
View File
@@ -734,7 +734,7 @@ screen.World.comment = Configure settings for various things that happen in the
option.WATER_SUN_REFLECTION_STRENGTH = Water sun reflection strength
screen.World_Effects = World Effects
screen.World_Effects = World Weather Effects
option.Puddles = Puddles
option.Puddle_Size = Puddle Size Multiplier
option.Puddle_Reflection_Strength = Puddle Reflection Strength
@@ -747,6 +747,7 @@ screen.World.comment = Configure settings for various things that happen in the
option.RIPPLE_WATER = Ripples on Water
option.RIPPLE_PUDDLES = Ripples on Puddles
option.RIPPLE_INTENSITY = Ripple Intensity
option.RIPPLE_STRENGTH = Water Ripple Strength
screen.Climate.comment = Configure settings related to the climate, like seasonal colors, daily weather, and biome specific fog.
screen.Seasons.comment = Seasonal colors that cycle through, summer, fall, winter, and spring.
+1
View File
@@ -291,6 +291,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
#define RIPPLE_WATER
#define RIPPLE_PUDDLES
#define RIPPLE_INTENSITY 0.85 // [0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0]
#define RIPPLE_STRENGTH 1.0 // [0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0]
// #define MATERIAL_AO
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 809 KiB