From f0b68649bd42d6b14d1727ea8fb944283851fe45 Mon Sep 17 00:00:00 2001 From: Merlin1809 <88194861+Merlin1809@users.noreply.github.com> Date: Thu, 20 Aug 2026 00:21:59 +0200 Subject: [PATCH] improve translucent particle lightmap with floodfill --- shaders/dimensions/all_particles.fsh | 4 ++-- shaders/dimensions/all_translucent.fsh | 2 +- shaders/lang/en_us.lang | 2 +- shaders/lang/zh_cn.lang | 2 +- shaders/lib/diffuse_lighting.glsl | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shaders/dimensions/all_particles.fsh b/shaders/dimensions/all_particles.fsh index 0934764..4bc657c 100644 --- a/shaders/dimensions/all_particles.fsh +++ b/shaders/dimensions/all_particles.fsh @@ -496,7 +496,7 @@ void main() { const vec3 lpvPos = vec3(0.0); #endif - vec3 Indirect_lighting = doBlockLightLighting(vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.x, feetPlayerPos, lpvPos); + vec3 Indirect_lighting = doBlockLightLighting(vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.x, feetPlayerPos, lpvPos, false); #ifdef FLASHLIGHT vec4 flashLightSpecularData = vec4(0.0); @@ -596,7 +596,7 @@ void main() { const vec3 lpvPos = vec3(0.0); #endif - Indirect_lighting += doBlockLightLighting( vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.x, feetPlayerPos, lpvPos); + Indirect_lighting += doBlockLightLighting( vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.x, feetPlayerPos, lpvPos, true); #ifdef LINES gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * toLinear(color.rgb); diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index 62e63af..23575fc 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -1074,7 +1074,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) #ifdef MAIN_SHADOW_PASS Indirect_lighting += doBlockLightLighting(lightColor, lightmap.x, feetPlayerPos, lpvPos, viewPos, false, BN, worldSpaceNormal, false, false); #else - Indirect_lighting += doBlockLightLighting(lightColor, lightmap.x, feetPlayerPos, lpvPos); + Indirect_lighting += doBlockLightLighting(lightColor, lightmap.x, feetPlayerPos, lpvPos, false); #endif vec4 flashLightSpecularData = vec4(0.0); diff --git a/shaders/lang/en_us.lang b/shaders/lang/en_us.lang index d41db35..f211321 100644 --- a/shaders/lang/en_us.lang +++ b/shaders/lang/en_us.lang @@ -1,6 +1,6 @@ option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit prefix.SHADER_VERSION_LABEL = V - value.SHADER_VERSION_LABEL.482 = 8.3.2 + value.SHADER_VERSION_LABEL.482 = 8.3.3 iris_extension.keybind.key0.name=Flashlight diff --git a/shaders/lang/zh_cn.lang b/shaders/lang/zh_cn.lang index 627f087..7858b4c 100644 --- a/shaders/lang/zh_cn.lang +++ b/shaders/lang/zh_cn.lang @@ -1,6 +1,6 @@ option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版 prefix.SHADER_VERSION_LABEL = 版本 - value.SHADER_VERSION_LABEL.482 = 8.3.2 + value.SHADER_VERSION_LABEL.482 = 8.3.3 # 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名 profile.POTATO=§4土豆 (极低配置) diff --git a/shaders/lib/diffuse_lighting.glsl b/shaders/lib/diffuse_lighting.glsl index 6b17a81..663ddb8 100644 --- a/shaders/lib/diffuse_lighting.glsl +++ b/shaders/lib/diffuse_lighting.glsl @@ -105,8 +105,10 @@ vec3 doBlockLightLighting( vec3 lightColor, float lightmap, vec3 playerPos, vec3 lpvPos #ifdef MAIN_SHADOW_PASS - , vec3 viewPos, bool depthCheck, float noise, vec3 normals, bool hand, bool opaqueParticles + , vec3 viewPos, bool depthCheck, float noise, vec3 normals, bool hand #endif + + , bool patricles ){ lightmap = clamp(lightmap,0.0,1.0); @@ -126,9 +128,7 @@ vec3 doBlockLightLighting( lpvSample.rgb *= lightmapCurve; #endif - #ifdef MAIN_SHADOW_PASS - if(opaqueParticles) lpvSample.rgb += lightmapCurve; - #endif + if(patricles) lpvSample.rgb += lightmapCurve; // vec3 lpvBlockLight = GetLpvBlockLight(lpvSample); // create a smooth falloff at the edges of the voxel volume.