From 7811e2523658b8f47cc796ce1f90ec60b9e79892 Mon Sep 17 00:00:00 2001 From: Xonk Date: Sat, 23 Mar 2024 18:29:25 -0400 Subject: [PATCH] stop water tinting like glass, tweak torch lighting, fix charged creepers charge not scrolling --- shaders/block.properties | 2 +- shaders/dimensions/all_solid.vsh | 4 ++-- shaders/dimensions/all_translucent.fsh | 6 +++--- shaders/dimensions/composite1.fsh | 7 +++---- shaders/dimensions/composite3.fsh | 2 +- shaders/lib/diffuse_lighting.glsl | 8 +++++--- shaders/lib/settings.glsl | 2 +- shaders/lib/volumetricClouds.glsl | 1 + 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/shaders/block.properties b/shaders/block.properties index e6c64df..d172992 100644 --- a/shaders/block.properties +++ b/shaders/block.properties @@ -42,7 +42,7 @@ block.10008 = minecraft:grass_block:snowy=false ####### ----- lightsources ----- ####### - block.10005 = minecraft:sculk_sensor:sculk_sensor_phase=active minecraft:soul_fire minecraft:soul_campfire:lit=true minecraft:cave_vines_plant:berries=true minecraft:soul_lantern minecraft:soul_torch minecraft:soul_wall_torch minecraft:conduit minecraft:beacon minecraft:sea_pickle minecraft:respawn_anchor:charges=4 minecraft:smoker:lit=true minecraft:blast_furnace:lit=true minecraft:furnace:lit=true minecraft:lava_cauldron minecraft:sea_lantern minecraft:cave_vines:berries=true minecraft:glowstone minecraft:torch minecraft:wall_torch minecraft:lava minecraft:fire minecraft:redstone_torch minecraft:redstone_wall_torch minecraft:jack_o_lantern minecraft:magma_block minecraft:redstone_lamp:lit=true minecraft:lantern minecraft:campfire:lit=true minecraft:shroomlight minecraft:end_rod minecraft:end_gateway minecraft:lava minecraft:fire \ + block.10005 = minecraft:sculk_sensor:sculk_sensor_phase=active minecraft:soul_fire minecraft:soul_campfire:lit=true minecraft:cave_vines_plant:berries=true minecraft:soul_lantern minecraft:soul_torch minecraft:soul_wall_torch minecraft:conduit minecraft:beacon minecraft:sea_pickle minecraft:respawn_anchor:charges=4 minecraft:smoker:lit=true minecraft:sea_lantern minecraft:cave_vines:berries=true minecraft:glowstone minecraft:torch minecraft:wall_torch minecraft:lava minecraft:fire minecraft:redstone_torch minecraft:redstone_wall_torch minecraft:jack_o_lantern minecraft:magma_block minecraft:redstone_lamp:lit=true minecraft:lantern minecraft:campfire:lit=true minecraft:shroomlight minecraft:end_rod minecraft:end_gateway minecraft:lava minecraft:fire \ \ westerosblocks:safe_fire \ \ diff --git a/shaders/dimensions/all_solid.vsh b/shaders/dimensions/all_solid.vsh index 6296b3c..b017794 100644 --- a/shaders/dimensions/all_solid.vsh +++ b/shaders/dimensions/all_solid.vsh @@ -202,8 +202,8 @@ void main() { /////// ----- RANDOM STUFF ----- /////// - - lmtexcoord.xy = (gl_MultiTexCoord0).xy; + // gl_TextureMatrix[0] for animated things like charged creepers + lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; // #ifdef POM vec2 midcoord = (gl_TextureMatrix[0] * mc_midTexCoord).st; diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index 0261013..e442493 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -526,10 +526,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) #endif #ifdef NETHER_SHADER - // vec3 AmbientLightColor = skyCloudsFromTexLOD2(WS_normal, colortex4, 6).rgb ; + // vec3 AmbientLightColor = skyCloudsFromTexLOD2(WS_normal, colortex4, 6).rgb / 15.0; - // vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb; - // vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb; + // vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb/ 30.0; + // vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb/ 30.0; // up *= pow( max( WS_normal.y, 0), 2); // down *= pow( max(-WS_normal.y, 0), 2); diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index 0f86cc0..8171c44 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -1207,10 +1207,10 @@ void main() { #endif #ifdef NETHER_SHADER - // Indirect_lighting = skyCloudsFromTexLOD2(normal, colortex4, 6).rgb; + // Indirect_lighting = skyCloudsFromTexLOD2(normal, colortex4, 6).rgb / 15.0; - // vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb; - // vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb; + // vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb/ 30.0; + // vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb/ 30.0; // up *= pow( max( slopednormal.y, 0), 2); // down *= pow( max(-slopednormal.y, 0), 2); @@ -1340,7 +1340,6 @@ void main() { gl_FragData[0].rgb = gl_FragData[0].rgb * vlBehingTranslucents.a + vlBehingTranslucents.rgb; } - ////// DEBUG VIEW STUFF #if DEBUG_VIEW == debug_SHADOWMAP vec3 OutsideShadowMap_and_DH_shadow = (shadowMapFalloff > 0.0 && z >= 1.0) ? vec3(0.25,1.0,0.25) : vec3(1.0,0.25,0.25); diff --git a/shaders/dimensions/composite3.fsh b/shaders/dimensions/composite3.fsh index ae91cd3..023b52d 100644 --- a/shaders/dimensions/composite3.fsh +++ b/shaders/dimensions/composite3.fsh @@ -328,7 +328,7 @@ void main() { if (TranslucentShader.a > 0.0){ #ifdef Glass_Tint - if(albedo.a > 0.01) color *= normalize(albedo.rgb+0.0001)*0.9+0.1; + if(!iswater) color *= normalize(albedo.rgb+0.0001)*0.9+0.1; #endif color = color*(1.0-TranslucentShader.a) + TranslucentShader.rgb; diff --git a/shaders/lib/diffuse_lighting.glsl b/shaders/lib/diffuse_lighting.glsl index fcf7cd6..ee28b9f 100644 --- a/shaders/lib/diffuse_lighting.glsl +++ b/shaders/lib/diffuse_lighting.glsl @@ -12,10 +12,12 @@ vec3 DoAmbientLightColor( vec3 IndirectLight = max(SkyColor * ambient_brightness * skyLM, MinimumLight); // do torch lighting. - float TorchLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.x)),5.0)+0.1)); - TorchLM = pow(TorchLM/4,10) + pow(Lightmap.x,1.5)*0.5; - + // float TorchLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.x)),5.0)+0.1)); + // TorchLM = pow(TorchLM/4,10) + pow(Lightmap.x,1.5)*0.5; + + float TorchLM = pow(Lightmap.x,10.0)*5.0 + pow(Lightmap.x,1.5); vec3 TorchLight = TorchColor * TORCH_AMOUNT * TorchLM * (1.0 + LightLevelZero*dot(SkyColor * ambient_brightness,vec3(0.3333))); + return IndirectLight + TorchLight; } diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index 23647e4..44ab2fa 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -253,7 +253,7 @@ const float entityShadowDistanceMul = 1.0; // [0.05 0.10 1.50 0.20 0.25 0.30 0.3 #define LIGHTSOURCE_REFLECTION #endif -#define EMISSIVE_TYPE 2 // [0 1 2 3] +#define EMISSIVE_TYPE 0 // [0 1 2 3] #define Emissive_Brightness 10.0 // [1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 100.] #define Emissive_Curve 2.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 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ] diff --git a/shaders/lib/volumetricClouds.glsl b/shaders/lib/volumetricClouds.glsl index f9efbf8..bf4e38c 100644 --- a/shaders/lib/volumetricClouds.glsl +++ b/shaders/lib/volumetricClouds.glsl @@ -265,6 +265,7 @@ vec3 DoCloudLighting( ){ float powder = 1.0 - exp(-5.0 * sqrt(density)); + // float powder = 1.0 - exp(-15.0 * density); vec3 indirectLight = skyLightCol * mix(1.0, 1.0 - exp(-1.0 * (1.0-sqrt(density))), skyScatter*skyScatter*skyScatter * distantfog);