Add two alternate medium/high profiles, make high profile default, improve cloud erosion a little, add simple film grain, slightly improve DH noise

This commit is contained in:
Merlin1809
2025-09-27 03:50:08 +02:00
parent 611afde56d
commit c5af48fc98
9 changed files with 52 additions and 35 deletions
+7 -6
View File
@@ -3,6 +3,7 @@
varying vec4 pos;
varying vec4 localPos;
varying vec4 vPos;
varying vec4 gcolor;
varying vec2 lightmapCoords;
varying vec4 normals_and_materials;
@@ -116,10 +117,10 @@ vec3 quantize(const in vec3 val, const in int stepSize) {
return floor(val * stepSize) / stepSize;
}
vec4 applyNoise(in vec4 fragColor, const in vec3 viewPos, const in float viewDist) {
// vec3 vertexNormal = normalize(cross(dFdy(vPos.xyz), dFdx(vPos.xyz)));
vec4 applyNoise(in vec4 fragColor, const in float viewDist) {
vec3 vertexNormal = normalize(cross(dFdy(vPos.xyz), dFdx(vPos.xyz)));
// // This bit of code is required to fix the vertex position problem cus of floats in the verted world position varuable
// vec3 fixedVPos = vPos.xyz + vertexNormal * 0.001;
vec3 fixedVPos = vPos.xyz + vertexNormal * 0.001;
float noiseAmplification = noiseIntensity * 0.01;
float lum = (fragColor.r + fragColor.g + fragColor.b) / 3.0;
@@ -128,7 +129,7 @@ vec4 applyNoise(in vec4 fragColor, const in vec3 viewPos, const in float viewDis
// Mikis idea. make it such that you can control the step amount as distance increases out from where vanilla chunks end.
// ideally, close = higher steps and far = lower steps
float highestSteps = NOISE_RESOLUTION;
float highestSteps = NOISE_RESOLUTION + blueNoise();
float lowestSteps = 2.0;
float transitionLength = 16.0 * 16.0; // distance it takes to reach the lowest steps from the highest. measured in meters/blocks.
@@ -138,7 +139,7 @@ vec4 applyNoise(in vec4 fragColor, const in vec3 viewPos, const in float viewDis
int dynamicNoiseSteps = int(mix(highestSteps, lowestSteps, transitionGradient));
// Random value for each position
float randomValue = rand(quantize(viewPos, dynamicNoiseSteps))
float randomValue = rand(quantize(fixedVPos+cameraPosition, dynamicNoiseSteps))
* 2.0 * noiseAmplification - noiseAmplification;
// Modifies the color
@@ -191,7 +192,7 @@ void main() {
// alpha is material masks, set it to 0.65 to make a DH LODs mask.
#ifdef DH_NOISE_TEXTURE
vec4 Albedo = applyNoise(gcolor, localPos.xyz+cameraPosition, viewDist);
vec4 Albedo = applyNoise(gcolor, viewDist);
#else
vec4 Albedo = vec4(gcolor.rgb, 1.0);
#endif
+2 -1
View File
@@ -3,6 +3,7 @@
varying vec4 pos;
varying vec4 localPos;
varying vec4 vPos;
varying vec4 gcolor;
varying vec2 lightmapCoords;
varying vec4 normals_and_materials;
@@ -58,7 +59,7 @@ void main() {
// gl_Position = toClipSpace3(position);
vec4 vPos = gl_Vertex;
vPos = gl_Vertex;
vec3 cameraOffset = fract(cameraPosition);
vPos.xyz = floor(vPos.xyz + cameraOffset + 0.5) - cameraOffset;
+2 -2
View File
@@ -570,8 +570,8 @@ void main() {
float linearDistance_cylinder_alt = length(playerPos_alt.xz);
#endif
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2.) ,0.0,1.0);
float lightleakfixfast = clamp(eyeBrightness.y/240.,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);
////// --------------- UNPACK OPAQUE GBUFFERS --------------- //////
// float opaqueMasks = decodeVec2(texture2D(colortex1,texcoord).a).y;
+2 -2
View File
@@ -23,8 +23,8 @@ vec2 quarterResTC = gl_FragCoord.xy*2.*texelSize;
//0.25
gl_FragData[0] += texture2D(colortex3,quarterResTC-2.0*vec2(texelSize.x,0.0))/2.*0.125;
gl_FragData[0] += texture2D(colortex3,quarterResTC+2.0*vec2(0.0,texelSize.y))/2.*0.125;
gl_FragData[0] += texture2D(colortex3,quarterResTC+2.0*vec2(0,-texelSize.y))/2*0.125;
gl_FragData[0] += texture2D(colortex3,quarterResTC+2.0*vec2(-texelSize.x,0.0))/2*0.125;
gl_FragData[0] += texture2D(colortex3,quarterResTC+2.0*vec2(0.0,-texelSize.y))/2.*0.125;
gl_FragData[0] += texture2D(colortex3,quarterResTC+2.0*vec2(-texelSize.x,0.0))/2.*0.125;
//0.125
gl_FragData[0] += texture2D(colortex3,quarterResTC-2.0*vec2(texelSize.x,texelSize.y))/4.*0.125;
+8
View File
@@ -166,6 +166,14 @@ void main() {
applyGameplayEffects(COLOR, texcoord, noise);
#endif
#ifdef FILM_GRAIN
// basic film grain implementation from https://www.shadertoy.com/view/4sXSWs slightly edited
float x = (texcoord.x + 4.0 ) * (texcoord.y + 4.0 ) * (frameTimeCounter * 10.0);
vec3 grain = vec3(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01)-0.005) * FILM_GRAIN_STRENGTH;
COLOR += grain;
#endif
#ifdef DROWNING_EFFECT
if (currentPlayerAir != -1.0) COLOR *= 0.2 + 0.8*drowningSmooth;
#endif
+6 -4
View File
@@ -1,13 +1,15 @@
option.SHADER_VERSION_LABEL = §dECLIPSE§r - A Bliss Edit
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
prefix.SHADER_VERSION_LABEL = V
value.SHADER_VERSION_LABEL.482 = 3.0.5
value.SHADER_VERSION_LABEL.482 = 3.1.0
# if you're here to translate, this is not a joke, these do what they say
profile.POTATO=§4Potato
profile.VERY_LOW=§cVery Low
profile.LOW=§aLow
profile.MEDIUM=§2Medium (Recommended)
profile.HIGH=§bHigh (Recommended)
profile.MEDIUM=§2Medium §6§l(Recommended)
profile.ALTERNATE_MEDIUM=§2Medium §7(Alternate Style)
profile.HIGH=§bHigh §6§l(Recommended)
profile.ALTERNATE_HIGH=§bHigh §7(Alternate Style)
profile.VERY_HIGH=§9Very High
profile.ULTRA=§dUltra
+12 -9
View File
@@ -15,7 +15,7 @@
#define WATER_SIM_SCALE 1 // [0 1 2]
#define WATER_SIM_DISTANCE 2 // [1 2 3 4]
#define WATER_SIM_FRAMERATE 30 // [30 60]
#define WATER_SIM_FRAMERATE 60 // [30 60]
const float WATER_SIM_FRAMETIME = 1.0/float(WATER_SIM_FRAMERATE);
// #define PIXELATED_WAVES
@@ -96,7 +96,7 @@ const float WATER_SIM_FRAMETIME = 1.0/float(WATER_SIM_FRAMERATE);
#define SeparateAmbientColorRain
#define AmbientLightRain_R 0.15 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
#define AmbientLightRain_G 0.15 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
#define AmbientLightRain_B 0.1475 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
#define AmbientLightRain_B 0.125 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
#define AmbientLightEnd_R 0.3 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
#define AmbientLightEnd_G 0.35 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
@@ -136,7 +136,7 @@ const float ambientOcclusionLevel = 1.0; // this controls vanilla minecrafts amb
const float sunPathRotation = -35; //[-90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 -49 -48 -47 -46 -45 -44 -43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 ]
const int shadowMapResolution = 2048; // [512 768 1024 1536 2048 2560 3172 3684 4096 5120 6144 7168 8192]
const int shadowMapResolution = 2560; // [512 768 1024 1536 2048 2560 3172 3684 4096 5120 6144 7168 8192]
const float shadowDistance = 128.0; // [32.0 48.0 64.0 80.0 96.0 112.0 128.0 144.0 160.0 176.0 192.0 208.0 224.0 240.0 256.0 272.0 288.0 304.0 320.0 336.0 352.0 368.0 384.0 512.0 768.0 1024.0 1536.0 2048.0 4096.0 8192.0]
const float shadowDistanceRenderMul = 1.0;
@@ -177,7 +177,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
//////////////////////////////////////
#define TOGGLE_VL_FOG
#define VL_SAMPLES 6 // [4 6 8 10 12 14 16 20 24 30 40 50]
#define VL_SAMPLES 8 // [4 6 8 10 12 14 16 20 24 30 40 50]
#define FOG_START_HEIGHT 60 // [-200 -190 -180 -170 -160 -150 -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]
@@ -195,7 +195,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
#define Night_Uniform_Fog 0.2 // [0.0 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 Night_Cloudy_Fog 0.05 // [0.0 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 Haze_amount 0.85 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.25 1.5 1.75 2.0 3.0 4.0 5.0]
#define Haze_amount 1.0 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.25 1.5 1.75 2.0 3.0 4.0 5.0]
#define fog_coefficientRayleighR 5.8 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
#define fog_coefficientRayleighG 1.35 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
#define fog_coefficientRayleighB 3.31 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
@@ -305,15 +305,15 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
#define SCREENSPACE_DIRECT_SSS_BLENDING 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
// #define Porosity
#define PUDDLE_MODE 0 // [0 1 2 3]
#define PUDDLE_MODE 1 // [0 1 2 3]
#define Puddle_Size 1.0 // [0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5]
#define Puddle_Reflection_Sharpness 0.9 // [0.9 0.925 0.95 0.975 1.0]
#define ShaderSnow 0 // [0 1 2 3]
#define ShaderSnow 1 // [0 1 2 3]
#define ShaderSnowStrength 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]
#define RIPPLE_WATER
// #define RIPPLE_PUDDLES
#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]
@@ -751,6 +751,9 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
// #define VIGNETTE
#define VIGNETTE_STRENGTH 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
// #define FILM_GRAIN
#define FILM_GRAIN_STRENGTH 2.5 // [0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
///////////////////////////////////////////////////////
// ----- GAMEPLAY POST EFFECT RELATED SETTINGS ----- //
///////////////////////////////////////////////////////
@@ -975,7 +978,7 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
// ----- FLOODFILL [LPV] SETTINGS ----- //
///////////////////////////////////////////
//#define LPV_ENABLED
#define LPV_ENABLED
#define LPV_SIZE 7 // [6 7 8]
#define LPV_SATURATION 50 // [0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200]
#define LPV_TINT_SATURATION 100 // [0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200]
+2 -2
View File
@@ -249,7 +249,7 @@ float getCloudShape(int LayerIndex, int LOD, in vec3 position, float minHeight,
case SMALLCUMULUS_LAYER: {
erosion += (1.0-densityAtPos(samplePos * CloudLayer0_detail * CloudLayer0_scale / 3.0)) * sqrt(omShape);
float falloff = 1.0 - clamp((posToMax)/100.0,0.0,1.0);
float falloff = 1.0 - clamp(posToMax/(CloudLayer0_tallness/CloudLayer0_scale),0.0,1.0);
erosion += abs(densityAtPos(samplePos * CloudLayer0_detail * CloudLayer0_scale) - falloff) * 0.75 * (omShape) * (1.0-falloff*0.25);
erosion = erosion*erosion*erosion*erosion;
@@ -257,7 +257,7 @@ float getCloudShape(int LayerIndex, int LOD, in vec3 position, float minHeight,
case LARGECUMULUS_LAYER: {
erosion += (1.0 - densityAtPos(samplePos * CloudLayer1_detail * CloudLayer1_scale / 4.5)) * sqrt(omShape);
float falloff = 1.0 - clamp((posToMax)/200.0,0.0,1.0);
float falloff = 1.0 - clamp(posToMax/(CloudLayer1_tallness/CloudLayer1_scale),0.0,1.0);
erosion += abs(densityAtPos(samplePos * CloudLayer1_detail * CloudLayer1_scale) - falloff) * 0.75 * (omShape) * (1.0-falloff*0.5);
erosion = erosion*erosion*erosion*erosion;
File diff suppressed because one or more lines are too long