diff --git a/changelog.md b/changelog.md index 2f3cbd6..62598a6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +v2.5.1 - 3/16/24 + - Fixed overworld lighting + - Improved skulk + - Added pulse to end crystals + v2.5 - 3/16/24 - Fixed light source bug - Improved Nether ligting diff --git a/shaders/block.properties b/shaders/block.properties index dcd2ee3..c1df473 100644 --- a/shaders/block.properties +++ b/shaders/block.properties @@ -44,7 +44,7 @@ block.10046=\ minecraft:anvil block.10048=\ minecraft:chipped_anvil block.10052=\ minecraft:damaged_anvil block.10056=\ minecraft:powered_rail:powered=true -block.10057=\ minecraft:note_block:powered=true +block.10057=\ minecraft:note_block:powered=true minecraft:jukebox:has_record=true block.10100= \ minecraft:grass minecraft:fern minecraft:seagrass minecraft:dead_bush\ minecraft:crimson_roots minecraft:warped_roots minecraft:nether_sprouts @@ -67,7 +67,7 @@ minecraft:azalea minecraft:flowering_azalea minecraft:big_dripleaf minecraft:big minecraft:cave_vines_plant:berries=false minecraft:cave_vines:berries=false block.10108= \ minecraft:lily_pad -block.10465= \ minecraft:brown_mushroom_block +block.10465= \ minecraft:nether_portal block.10109= \ minecraft:oak_sapling minecraft:spruce_sapling minecraft:birch_sapling minecraft:jungle_sapling minecraft:acacia_sapling minecraft:dark_oak_sapling minecraft:mangrove_propagule minecraft:cherry_sapling \ minecraft:dead_bush minecraft:cactus minecraft:red_mushroom minecraft:brown_mushroom minecraft:cobweb minecraft:nether_wart minecraft:crimson_fungus minecraft:warped_fungus \ @@ -82,12 +82,12 @@ minecraft:jack_o_lantern minecraft:campfire:lit=true \ minecraft:sea_pickle minecraft:glow_lichen \ minecraft:small_amethyst_bud minecraft:medium_amethyst_bud minecraft:large_amethyst_bud minecraft:amethyst_cluster \ minecraft:ochre_froglight minecraft:verdant_froglight minecraft:pearlescent_froglight \ -minecraft:sculk minecraft:sculk_vein minecraft:sculk_sensor minecraft:calibrated_sculk_sensor minecraft:sculk_catalyst minecraft:sculk_shrieker \ minecraft:respawn_anchor:charges=1 minecraft:respawn_anchor:charges=2 minecraft:respawn_anchor:charges=3 minecraft:respawn_anchor block.10201= \ minecraft:glowstone minecraft:shroomlight minecraft:redstone_lamp:lit=true minecraft:sea_lantern minecraft:lantern:hanging=false \ minecraft:magma_block\ minecraft:soul_lantern:hanging=false +block.10289= \ minecraft:sculk minecraft:sculk_vein minecraft:sculk_sensor minecraft:calibrated_sculk_sensor minecraft:sculk_catalyst minecraft:sculk_shrieker block.10202= \ minecraft:furnace:lit=true minecraft:blast_furnace:lit=true minecraft:smoker:lit=true block.10210=\ minecraft:brewing_stand:has_bottle_0=true @@ -179,7 +179,7 @@ block.10204= \ minecraft:fire block.10205= \ minecraft:beacon -block.10465= \ minecraft:coal_ore +block.10465= \ minecraft:nether_portal block.10300= \ minecraft:water minecraft:flowing_water nether_portal block.10301= \ @@ -237,7 +237,7 @@ block.10204= \ minecraft:fire block.10205= \ minecraft:beacon -block.10465= \ minecraft:coal_ore +block.10465= \ minecraft:nether_portal block.10300= \ minecraft:water minecraft:flowing_water block.10301= \ diff --git a/shaders/entity.properties b/shaders/entity.properties index 46fd77a..b31ed57 100644 --- a/shaders/entity.properties +++ b/shaders/entity.properties @@ -10,5 +10,5 @@ entity.10100=minecraft:item_frame minecraft:painting minecraft:glow_item_frame entity.10301=minecraft:warden entity.10101=minecraft:lightning_bolt - +entity.10102=minecraft:end_crystal #endif \ No newline at end of file diff --git a/shaders/lib/lighting/coloredBlocklight.glsl b/shaders/lib/lighting/coloredBlocklight.glsl index 360c2d0..ccdd2f8 100644 --- a/shaders/lib/lighting/coloredBlocklight.glsl +++ b/shaders/lib/lighting/coloredBlocklight.glsl @@ -26,7 +26,7 @@ vec3 ApplyMultiColoredBlocklight(vec3 blocklightCol, vec3 screenPos) { coloredLightNormalized = normalize(coloredLight + 1e-6); coloredLightNormalized = mix(coloredLightNormalized * coloredLightNormalized, vec3(1.0), 0.1); - coloredLightNormalized *= GetLuminance(blocklightCol) * 1.2; // Adjust the multiplier here + coloredLightNormalized *= GetLuminance(blocklightCol) * .2; // Adjust the multiplier here coloredLightNormalized = mix(coloredLightNormalized, vec3(0.5, 0.6, 1.0), 0.5); // Introduce a colder tone coloredLightMix = min(dot(coloredLightNormalized, vec3(1.0)), 1.0); diff --git a/shaders/lib/lighting/forwardLighting.glsl b/shaders/lib/lighting/forwardLighting.glsl index 41e708c..b442d43 100644 --- a/shaders/lib/lighting/forwardLighting.glsl +++ b/shaders/lib/lighting/forwardLighting.glsl @@ -64,7 +64,7 @@ void GetLighting(inout vec3 albedo, out vec3 shadow, vec3 viewPos, vec3 worldPos #endif #ifdef OVERWORLD - float shadowMult = (1.0 * rainStrength) * shadowFade; + float shadowMult = (1.0 - 0.95 * rainStrength) * shadowFade; vec3 sceneLighting = mix(ambientCol * lightmap.y, lightCol, fullShadow * shadowMult); sceneLighting *= lightmap.y * lightmap.y * (1.0 + scattering * shadow); @@ -127,11 +127,11 @@ void GetLighting(inout vec3 albedo, out vec3 shadow, vec3 viewPos, vec3 worldPos desatColor = mix(vec3(0.4), desatColor, sqrt(lightmap.y)) * 1.7; #endif - #ifdef NETHER -float desatAmount = 0.9 - smoothstep(0.25,1.0,(1.0 - lightmap.x) * (1.0 - lightmap.x)) * (1.0 - lightFlatten) * 1.5; + #ifdef NETHER + float desatAmount = 1.0 - smoothstep(0.25,1.0,(1.0 - lightmap.x) * (1.0 - lightmap.x)) * (1.0 - lightFlatten); -vec3 desatColor = normalize(netherColSqrt.rgb + 0.000001) * 2.0; -#endif + vec3 desatColor = normalize(netherColSqrt.rgb + 0.000001) * 1.7; + #endif #ifdef END float desatAmount = 1.0 - smoothstep(0.25,1.0,(1.0 - lightmap.x) * (1.0 - lightmap.x)) * (1.0 - lightFlatten); diff --git a/shaders/lib/vertex/waving.glsl b/shaders/lib/vertex/waving.glsl index 34a5735..5ea4e10 100644 --- a/shaders/lib/vertex/waving.glsl +++ b/shaders/lib/vertex/waving.glsl @@ -147,9 +147,6 @@ vec3 WavingBlocks(vec3 position, float istopv) { wave.z += cos(worldpos.y * swingSpeed + frametime) * swingAmplitude * swingDirection; } #endif - if (mc_Entity.x == 10109 && istopv > 0.9) { - wave += CalcMove(worldpos, 0.35, 1.15, vec2(0.15, 0.06)); - } position += wave; return position; diff --git a/shaders/program/gbuffers_block.glsl b/shaders/program/gbuffers_block.glsl index 9ed62ab..375e25c 100644 --- a/shaders/program/gbuffers_block.glsl +++ b/shaders/program/gbuffers_block.glsl @@ -22,9 +22,9 @@ varying vec3 viewVector; varying vec4 vTexCoord, vTexCoordAM; #endif -uniform bool isHighlighted; // Add this line to declare the isHighlighted variable +uniform bool isHighlighted; -uniform vec3 cameraDirection; // This should be the direction the camera is pointing +uniform vec3 cameraDirection; //Uniforms// uniform int blockEntityId; @@ -354,60 +354,59 @@ void main() { if(blockEntityId == 10205) albedo.a = sqrt(albedo.a); #endif } -if (blockEntityId == 10401) { - vec2 portalCoord = gl_FragCoord.xy / vec2(viewWidth, viewHeight); - portalCoord = (portalCoord - 0.5) * vec2(aspectRatio, 1.0); + if (blockEntityId == 10401) { + vec2 portalCoord = gl_FragCoord.xy / vec2(viewWidth, viewHeight); + portalCoord = (portalCoord - 0.5) * vec2(aspectRatio, 1.0); - vec3 portColSqrt = vec3(END_R, END_G, END_B) / 255.0 * END_I; - vec3 portCol = portColSqrt * portColSqrt * 0.05; - vec2 wind = vec2(0, frametime * 0.025); + vec3 portColSqrt = vec3(END_R, END_G, END_B) / 255.0 * END_I; + vec3 portCol = portColSqrt * portColSqrt * 0.05; + vec2 wind = vec2(0, frametime * 0.025); - portCol += texture2D(noisetex, portalCoord * 0.1 + wind * 0.05).rgb * 0.05 * portColSqrt * portColSqrt * 0.05; - portCol += vec3(0.2, 0.5, 0.7); + portCol += texture2D(noisetex, portalCoord * 0.1 + wind * 0.05).rgb * 0.05 * portColSqrt * portColSqrt * 0.05; + portCol += vec3(0.2, 0.5, 0.7); - float portal = texture2D(noisetex, portalCoord * 0.1 + wind * 0.05).r * 0.2 + 0.8; + float portal = texture2D(noisetex, portalCoord * 0.1 + wind * 0.05).r * 0.2 + 0.8; - float glowFactor = step(mod(frameTimeCounter, 200), 1.0); - portal += glowFactor * (sin(frameCounter * 0.1) * 0.1 + 0.1); + float glowFactor = step(mod(frameTimeCounter, 200), 1.0); + portal += glowFactor * (sin(frameCounter * 0.1) * 0.1 + 0.1); - #ifdef END - portal *= 0.05; - #else - portal *= 0.02; - #endif - - portal += texture2D(texture, portalCoord * 0.5 + wind).r * 0.5; - portal += texture2D(texture, portalCoord + wind + 0.15).r * 0.5; - portal += texture2D(texture, portalCoord * 2.0 + wind + 0.30).r * 0.3; - portal += texture2D(texture, portalCoord * 4.0 + wind + 0.45).r * 0.2; + #ifdef END + portal *= 0.05; + #else + portal *= 0.02; + #endif - albedo.rgb = portal * portal * portCol.rgb; - albedo.a = 100.0; + portal += texture2D(texture, portalCoord * 0.5 + wind).r * 0.5; + portal += texture2D(texture, portalCoord + wind + 0.15).r * 0.5; + portal += texture2D(texture, portalCoord * 2.0 + wind + 0.30).r * 0.3; + portal += texture2D(texture, portalCoord * 4.0 + wind + 0.45).r * 0.2; - lightAlbedo = normalize(albedo.rgb * 10.0 + 0.00001); + albedo.rgb = portal * portal * portCol.rgb; + albedo.a = 100.0; - albedo.rgb = hue2(albedo.rgb, 150.0); - float vignette = length((gl_FragCoord.xy / vec2(viewWidth, viewHeight) - 0.5) * 2.0); - vignette = smoothstep(0.9, 1.0, 1.0 - vignette); - albedo.rgb *= mix(1.0, 0.9, vignette); + lightAlbedo = normalize(albedo.rgb * 10.0 + 0.00001); - float pulsateGlow = sin(frameCounter * 0.05) * 0.1 + 0.9; - albedo.rgb *= pulsateGlow; + albedo.rgb = hue2(albedo.rgb, 150.0); + float vignette = length((gl_FragCoord.xy / vec2(viewWidth, viewHeight) - 0.5) * 2.0); + vignette = smoothstep(0.9, 1.0, 1.0 - vignette); + albedo.rgb *= mix(1.0, 0.9, vignette); - float distortion = noise(gl_FragCoord.xy * 0.01); - albedo.rgb *= mix(1.0, 1.0 + distortion * 0.05, 0.5); + float pulsateGlow = sin(frameCounter * 0.05) * 0.1 + 0.9; + albedo.rgb *= pulsateGlow; - float scanline = sin(gl_FragCoord.y * 0.02) * 0.01 + 0.99; - albedo.rgb *= scanline; + float distortion = noise(gl_FragCoord.xy * 0.01); + albedo.rgb *= mix(1.0, 1.0 + distortion * 0.05, 0.5); - #if ALPHA_BLEND == 0 - albedo.rgb = sqrt(max(albedo.rgb, vec3(0.0))); - #endif -} -if (blockEntityId == 10109){ - albedo.rgb = vec3(0.5,0.5,1.0); -} + float scanline = sin(gl_FragCoord.y * 0.02) * 0.01 + 0.99; + albedo.rgb *= scanline; + #if ALPHA_BLEND == 0 + albedo.rgb = sqrt(max(albedo.rgb, vec3(0.0))); + #endif + } + if (blockEntityId == 10109){ + albedo.rgb = vec3(0.5,0.5,1.0); + } /* DRAWBUFFERS:0 */ gl_FragData[0] = albedo; diff --git a/shaders/program/gbuffers_entities.glsl b/shaders/program/gbuffers_entities.glsl index b4971c6..bf5f48f 100644 --- a/shaders/program/gbuffers_entities.glsl +++ b/shaders/program/gbuffers_entities.glsl @@ -156,7 +156,12 @@ void main() { float pulse = 0.0005 * (1.0 + sin(frameTimeCounter * 1 * 3.14159265358979)); albedo.rgb = mix(albedo.rgb, vec3(94.0,223.0,255.0), pulse); } + if (entityId == 10102){ + float pulse = .15 * (1.0 + sin(frameTimeCounter * 1 * 3.14159265358979)); + albedo.rgb = mix(albedo.rgb, vec3(0.0,0.0,0.0), pulse); + } float lightningBolt = float(entityId == 10101); + if(lightningBolt > 0.5) { #ifdef OVERWORLD albedo.rgb = weatherCol.rgb / weatherCol.a; diff --git a/shaders/program/gbuffers_terrain.glsl b/shaders/program/gbuffers_terrain.glsl index afc3c7c..105e11d 100644 --- a/shaders/program/gbuffers_terrain.glsl +++ b/shaders/program/gbuffers_terrain.glsl @@ -458,7 +458,9 @@ float reflectionScale = 0.7; #ifdef TAA #include "/lib/util/jitter.glsl" #endif - +float hash(float n) { + return fract(sin(n) * 43758.5453123); +} float emission = 10.0; @@ -519,7 +521,6 @@ void main() { mat = 5.0; if (mc_Entity.x == 10201 || mc_Entity.x == 10205 || mc_Entity.x == 10206) recolor = 1.0; - if (mc_Entity.x == 10202) lmCoord.x -= 0.0667; @@ -533,6 +534,23 @@ void main() { color.rgb *= 1.5; emission = 1.0; } + + + if (mc_Entity.x == 10289){ + float randomFactor = hash(frameTimeCounter); + + float pulse = sin(frameTimeCounter * .05 * 3.14159265358979 + randomFactor); + pulse = (pulse + 1.0) * 0.5; + + float smoothPulse = smoothstep(0.0, 1.0, pulse); + + vec3 baseColor = vec3(1.0, 1.0, 1.0); + vec3 lightColor = vec3(25.0/255.0, 134.0/255.0, 182.0/255.0); + + vec3 finalColor = mix(baseColor, lightColor, smoothPulse * 0.3); + + color.rgb = finalColor; + } if (mc_Entity.x == 10057){ color.rgb *= 1.22; } diff --git a/shaders/program/shadow.glsl b/shaders/program/shadow.glsl index 1eff6af..d20adf5 100644 --- a/shaders/program/shadow.glsl +++ b/shaders/program/shadow.glsl @@ -206,7 +206,7 @@ void main() { color = gl_Color; mat = 0; - if (mc_Entity.x == 10301 || mc_Entity.x == 10302) mat = 100; + if (mc_Entity.x == 10301 || mc_Entity.x == 10302) mat = 1; if (mc_Entity.x == 10300 || mc_Entity.x == 10304) mat = 2; #ifndef SHADOW_VEGETATION