From b153f92168d30f332babf9139b32efdee63c16a6 Mon Sep 17 00:00:00 2001 From: Merlin1809 <88194861+Merlin1809@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:57:25 +0200 Subject: [PATCH] Improve solid particles, fix voxy translucents in nether/end --- shaders/dimensions/all_particles.fsh | 99 ++++++++++++++++++- shaders/dimensions/composite.fsh | 5 +- shaders/dimensions/composite1.fsh | 8 +- shaders/dimensions/composite2.fsh | 3 +- shaders/dimensions/voxy_translucent.glsl | 40 +++++++- shaders/lang/en_us.lang | 2 +- shaders/lang/zh_cn.lang | 2 +- .../modifiers/attenuation_modifier.glsl | 24 ++--- shaders/shaders.properties | 5 +- shaders/world-1/deferred2.fsh | 5 + shaders/world-1/deferred2.vsh | 5 + shaders/world-1/gbuffers_particles.fsh | 6 ++ shaders/world-1/gbuffers_particles.vsh | 6 ++ .../gbuffers_particles_translucent.fsh | 7 ++ .../gbuffers_particles_translucent.vsh | 7 ++ shaders/world0/gbuffers_particles.fsh | 6 ++ shaders/world0/gbuffers_particles.vsh | 6 ++ .../world0/gbuffers_particles_translucent.fsh | 7 ++ .../world0/gbuffers_particles_translucent.vsh | 7 ++ .../gbuffers_particles.fsh | 7 ++ .../gbuffers_particles.vsh | 7 ++ .../gbuffers_particles_translucent.fsh | 8 ++ .../gbuffers_particles_translucent.vsh | 8 ++ .../gbuffers_particles.fsh | 7 ++ .../gbuffers_particles.vsh | 7 ++ .../gbuffers_particles_translucent.fsh | 8 ++ .../gbuffers_particles_translucent.vsh | 8 ++ shaders/world1/deferred2.fsh | 5 + shaders/world1/deferred2.vsh | 5 + shaders/world1/gbuffers_particles.fsh | 6 ++ shaders/world1/gbuffers_particles.vsh | 6 ++ .../world1/gbuffers_particles_translucent.fsh | 7 ++ .../world1/gbuffers_particles_translucent.vsh | 7 ++ shaders/world1/shadow.vsh | 7 +- 34 files changed, 321 insertions(+), 32 deletions(-) create mode 100644 shaders/world-1/deferred2.fsh create mode 100644 shaders/world-1/deferred2.vsh create mode 100644 shaders/world-1/gbuffers_particles.fsh create mode 100644 shaders/world-1/gbuffers_particles.vsh create mode 100644 shaders/world-1/gbuffers_particles_translucent.fsh create mode 100644 shaders/world-1/gbuffers_particles_translucent.vsh create mode 100644 shaders/world0/gbuffers_particles.fsh create mode 100644 shaders/world0/gbuffers_particles.vsh create mode 100644 shaders/world0/gbuffers_particles_translucent.fsh create mode 100644 shaders/world0/gbuffers_particles_translucent.vsh create mode 100644 shaders/world0_with_aether_flag/gbuffers_particles.fsh create mode 100644 shaders/world0_with_aether_flag/gbuffers_particles.vsh create mode 100644 shaders/world0_with_aether_flag/gbuffers_particles_translucent.fsh create mode 100644 shaders/world0_with_aether_flag/gbuffers_particles_translucent.vsh create mode 100644 shaders/world0_with_twilight_forest_flag/gbuffers_particles.fsh create mode 100644 shaders/world0_with_twilight_forest_flag/gbuffers_particles.vsh create mode 100644 shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.fsh create mode 100644 shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.vsh create mode 100644 shaders/world1/deferred2.fsh create mode 100644 shaders/world1/deferred2.vsh create mode 100644 shaders/world1/gbuffers_particles.fsh create mode 100644 shaders/world1/gbuffers_particles.vsh create mode 100644 shaders/world1/gbuffers_particles_translucent.fsh create mode 100644 shaders/world1/gbuffers_particles_translucent.vsh diff --git a/shaders/dimensions/all_particles.fsh b/shaders/dimensions/all_particles.fsh index 2a9e719..b551401 100644 --- a/shaders/dimensions/all_particles.fsh +++ b/shaders/dimensions/all_particles.fsh @@ -240,6 +240,9 @@ float ComputeShadowMap(inout vec3 directLightColor, vec3 playerPos, float maxDis } #endif +uniform sampler2D normals; +uniform sampler2D specular; + #if defined DAMAGE_BLOCK_EFFECT && defined POM mat3 inverseMatrix(mat3 m) { float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; @@ -269,8 +272,6 @@ float ComputeShadowMap(inout vec3 directLightColor, vec3 playerPos, float maxDis const float mincoord = 1.0/4096.0; const float maxcoord = 1.0-mincoord; - uniform sampler2D normals; - vec4 readNormal(in vec2 coord) { return textureGrad(normals,fract(coord)*texcoordam.pq+texcoordam.st,dcdx,dcdy); @@ -308,6 +309,35 @@ float luma(vec3 color) { } #endif +vec2 encodeNormal(vec3 n){ + n.xy = n.xy / dot(abs(n), vec3(1.0)); + n.xy = n.z <= 0.0 ? (1.0 - abs(n.yx)) * sign(n.xy) : n.xy; + vec2 encn = clamp(n.xy * 0.5 + 0.5,-1.0,1.0); + + return encn; +} + +vec3 viewToWorld(vec3 viewPosition) { + vec4 pos; + pos.xyz = viewPosition; + pos.w = 0.0; + pos = gbufferModelViewInverse * pos; + return pos.xyz; +} +vec3 worldToView(vec3 worldPos) { + vec4 pos = vec4(worldPos, 0.0); + pos = gbufferModelView * pos; + return pos.xyz; +} + +vec3 applyBump(mat3 tbnMatrix, vec3 bump){ + float bumpmult = NORMAL_MAP_MULT; + bump = bump * vec3(bumpmult, bumpmult, bumpmult) + vec3(0.0f, 0.0f, 1.0f - bumpmult); + return normalize(bump*tbnMatrix); +} + +uniform float alphaTestRef; +uniform vec3 playerLookVector; //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// @@ -317,6 +347,10 @@ float luma(vec3 color) { #ifdef DAMAGE_BLOCK_EFFECT /* RENDERTARGETS:11 */ +#elif defined PARTICLES_SOLID + /* RENDERTARGETS:1,8 */ + layout(location = 0) out vec4 OutAlbedo; + layout(location = 1) out vec4 OutSpecular; #else /* RENDERTARGETS:2,9,11,7 */ #endif @@ -326,7 +360,7 @@ void main() { #ifdef DAMAGE_BLOCK_EFFECT vec2 adjustedTexCoord = lmtexcoord.xy; #ifdef POM - vec3 fragpos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)-vec3(0.0)); + vec3 fragpos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)); // vec3 worldpos = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz + cameraPosition; @@ -400,7 +434,7 @@ void main() { gl_FragData[0] = vec4(encodeVec2(vec2(0.5)), encodeVec2(Albedo.rg), encodeVec2(vec2(Albedo.b,0.02)), 1.0); #endif -#if !defined DAMAGE_BLOCK_EFFECT +#if !defined DAMAGE_BLOCK_EFFECT && !defined PARTICLES_SOLID gl_FragData[2] = vec4(0.0); #ifdef LINES @@ -611,4 +645,61 @@ void main() { #endif #endif #endif + +#ifdef PARTICLES_SOLID + + vec4 Albedo = texture(gtexture, lmtexcoord.xy) * color; + if(Albedo.a < alphaTestRef){discard; return;} + + vec3 tangent = normalize(mat3(gbufferModelViewInverse) * vec3(1.0, 0.0, 0.0)); + vec3 binormal = normalize(mat3(gbufferModelViewInverse) * vec3(0.0, 1.0, 0.0)); + vec3 normal = normalize(mat3(gbufferModelViewInverse) * vec3(0.0, 0.0, 1.0)); + + mat3 tbnMatrix = mat3(tangent.x, binormal.x, normal.x, + tangent.y, binormal.y, normal.y, + tangent.z, binormal.z, normal.z); + + vec4 NormalTex = texture(normals, lmtexcoord.xy); + + #if defined MATERIAL_AO && defined MC_TEXTURE_FORMAT_LAB_PBR + Albedo.rgb *= NormalTex.b*0.5+0.5; + #endif + + NormalTex.xy = NormalTex.xy * 2.0-1.0; + NormalTex.z = sqrt(max(1.0 - dot(NormalTex.xy, NormalTex.xy), 0.0)); + + normal = applyBump(tbnMatrix, NormalTex.xyz); + + vec2 lightmap = clamp(lmtexcoord.zw,0.0,1.0); + + vec4 data1 = vec4(encodeNormal(normal), lightmap); + + Albedo = clamp(vec4(Albedo.rgb,0.85),0.0,1.0); + data1 = clamp(data1,0.0,1.0); + + if(tangent.x == 0.0 && tangent.y == 0.0 && tangent.z == 0.0) discard; + + OutAlbedo = vec4( + encodeVec2(Albedo.x,data1.x), + encodeVec2(Albedo.y,data1.y), + encodeVec2(Albedo.z,data1.z), + encodeVec2(data1.w,Albedo.w) + ); + + #if EMISSIVE_TYPE >= 2 || SSS_TYPE >= 2 + vec4 specularData = texture(specular, lmtexcoord.xy); + #else + vec4 specularData = vec4(0.0); + #endif + + vec4 otherData = clamp(vec4(normal*0.5+0.5, 1.0),0.0,1.0); + + OutSpecular = vec4( + encodeVec2(specularData.x, otherData.x), + encodeVec2(specularData.y, otherData.y), + encodeVec2(specularData.z, otherData.z), + encodeVec2(specularData.w, otherData.w) + ); + +#endif } \ No newline at end of file diff --git a/shaders/dimensions/composite.fsh b/shaders/dimensions/composite.fsh index 2d05419..cb74316 100644 --- a/shaders/dimensions/composite.fsh +++ b/shaders/dimensions/composite.fsh @@ -423,7 +423,7 @@ void main() { // bool translucent4 = abs(dataUnpacked1.w-0.65) <0.01; // Weak translucency // bool entities = abs(dataUnpacked1.w-0.45) < 0.01; bool hand = abs(dataUnpacked1.w-0.75) < 0.01; - // bool blocklights = abs(dataUnpacked1.w-0.8) <0.01; + bool opaqueParticles = abs(dataUnpacked1.w-0.85) <0.01; float z = texelFetch(depthtex1,ivec2(gl_FragCoord.xy),0).x; float z0 = texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).x; @@ -494,7 +494,7 @@ void main() { vec2 SSAO_SSS = vec2(1.0,0.0); - if(!isSky) { + if(!isSky && !opaqueParticles) { SSAO_SSS = SSAO(viewPos, worldToView(normal), worldToView(FlatNormals), hand, noise); SSAO_SSS.y = clamp(SSAO_SSS.y + 0.5 * lightmap.y*lightmap.y,0.0,1.0); } @@ -516,6 +516,7 @@ void main() { float LabSSS = clamp((-64.0 + SpecularTex.z * 255.0) / 191.0 ,0.0,1.0); float NdotL = clamp(dot(normal, sunVec),0.0,1.0); + if(opaqueParticles) NdotL = mix(0.5, 1.0, NdotL); #ifdef END_SHADER float minshadowfilt = Min_Shadow_Filter_Radius_END; diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index 140c956..8038d63 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -1139,7 +1139,7 @@ void main() { const float POM_DEEPNESS = 0.0; #endif // bool handwater = abs(translucentMasks-0.3) < 0.01 ; - // bool blocklights = abs(opaqueMasks-0.8) <0.01; + bool opaqueParticles = abs(opaqueMasks-0.85) <0.01; if(hand){ convertHandDepth(z); @@ -1339,6 +1339,10 @@ void main() { // NdotL = 1; float flatNormNdotL = clamp((-15 + dot((FlatNormals), WsunVec)*255.0) / 240.0 ,0.0,1.0); + if(opaqueParticles) { + flatNormNdotL = mix(0.5, 1.0, flatNormNdotL); + NdotL = mix(0.5, 1.0, NdotL); + } //////////////////////////////// SHADOWMAP //////////////////////////////// // setup shadow projection @@ -1441,7 +1445,7 @@ void main() { SS_directLight.r = mix(1.0, SS_directLight.r, 1.0-shadowMapFalloff); #endif - shadowColor *= SS_directLight.r; + if(!opaqueParticles) shadowColor *= SS_directLight.r; #else vec2 SS_directLight = vec2(1,0); ShadowBlockerDepth = max(ShadowBlockerDepth, (1.0-shadowMapFalloff2) * 10.0); diff --git a/shaders/dimensions/composite2.fsh b/shaders/dimensions/composite2.fsh index 65d6936..0c89a31 100644 --- a/shaders/dimensions/composite2.fsh +++ b/shaders/dimensions/composite2.fsh @@ -460,6 +460,7 @@ void main() { float opaqueMasks = dataUnpacked1.w; bool hand = abs(opaqueMasks-0.75) < 0.01; bool entities = abs(opaqueMasks-0.45) < 0.01; + bool opaqueParticles = abs(opaqueMasks-0.85) <0.01; #ifdef SHADER_GRASS bool isShaderGrass = abs(opaqueMasks-0.80) < 0.01; #else @@ -523,7 +524,7 @@ void main() { vec3 denoisedReflections = currentFrame.rgb; - if(roughness > 0.005 && alpha < 0.9999 && !hand && !entities + if(roughness > 0.005 && alpha < 0.9999 && !hand && !entities && !opaqueParticles #if defined DISTANT_HORIZONS || defined VOXY && z < 1.0 #endif diff --git a/shaders/dimensions/voxy_translucent.glsl b/shaders/dimensions/voxy_translucent.glsl index 848d256..0097fd5 100644 --- a/shaders/dimensions/voxy_translucent.glsl +++ b/shaders/dimensions/voxy_translucent.glsl @@ -30,6 +30,10 @@ layout (location = 3) out vec4 gbuffer_data_3; #undef WATER_SUN_SPECULAR #endif +#ifdef END_SHADER + #include "/lib/end_fog.glsl" +#endif + float GGX(vec3 n, vec3 v, vec3 l, float r, float f0) { r = max(pow(r,2.5), 0.0001); @@ -252,14 +256,40 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) float skylight = mix(0.08, 1.0, SkylightDir); AmbientLightColor *= skylight; + + vec3 MinimumLightColor = vec3(1.0); + Indirect_lighting = doIndirectLighting(AmbientLightColor, MinimumLightColor, parameters.lightMap.y); #endif - - #ifndef OVERWORLD_SHADER - vec3 AmbientLightColor = vec3(0.5); + + #ifdef NETHER_SHADER + Indirect_lighting = volumetricsFromTex(normal, colortex4, 0).rgb / 1200.0 / 1.5; #endif - vec3 MinimumLightColor = vec3(1.0); - Indirect_lighting = doIndirectLighting(AmbientLightColor, MinimumLightColor, parameters.lightMap.y); + #ifdef END_SHADER + #ifdef END_LIGHTNING + float vortexBounds = clamp(vortexBoundRange - length(feetPlayerPos+cameraPosition), 0.0,1.0); + #else + float vortexBounds = 1.0; + #endif + + vec3 lightPos = LightSourcePosition(feetPlayerPos+cameraPosition, cameraPosition,vortexBounds); + + float lightningflash = texelFetch(colortex4,ivec2(1,1),0).x/150.0; + vec3 lightColors = LightSourceColors(vortexBounds, lightningflash); + + float end_NdotL = clamp(dot(normal, normalize(-lightPos))*0.5+0.5,0.0,1.0); + end_NdotL *= end_NdotL; + + float fogShadow = GetEndFogShadow(feetPlayerPos+cameraPosition, lightPos); + float endPhase = endFogPhase(lightPos); + + Direct_lighting = lightColors * endPhase * end_NdotL * fogShadow; + + vec3 AmbientLightColor = vec3(AmbientLightEnd_R,AmbientLightEnd_G,AmbientLightEnd_B) ; + + Indirect_lighting = AmbientLightColor + 0.7 * AmbientLightColor * dot(normal, normalize(feetPlayerPos)); + Indirect_lighting *= 0.1; + #endif float indoors = min(max(parameters.lightMap.y-0.5,0.0)/0.4,1.0); diff --git a/shaders/lang/en_us.lang b/shaders/lang/en_us.lang index c58be0f..3f65962 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.0.5 + value.SHADER_VERSION_LABEL.482 = 8.1.0 iris_extension.keybind.key0.name=Flashlight diff --git a/shaders/lang/zh_cn.lang b/shaders/lang/zh_cn.lang index deb1bf2..5eefb7d 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.0.5 + value.SHADER_VERSION_LABEL.482 = 8.1.0 # 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名 profile.POTATO=§4土豆 (极低配置) diff --git a/shaders/photonics/modifiers/attenuation_modifier.glsl b/shaders/photonics/modifiers/attenuation_modifier.glsl index 7691d2d..8a28836 100644 --- a/shaders/photonics/modifiers/attenuation_modifier.glsl +++ b/shaders/photonics/modifiers/attenuation_modifier.glsl @@ -11,16 +11,14 @@ vec3 modify_attenuation( // Fix light on handheld light sources being weird if (light.index < 0 && ph_is_hand()) return light.color; - #ifdef SHADER_GRASS - vec4 data = texelFetch(colortex1, ivec2(gl_FragCoord.xy), 0); - - // vec4 dataUnpacked0 = vec4(decodeVec2(data.x),decodeVec2(data.y)); // albedo, masks - // vec4 dataUnpacked1 = vec4(decodeVec2(data.z),decodeVec2(data.w)); // normals, lightmaps - float opaqueMasks = decodeVec2(data.w).y; - bool isShaderGrass = abs(opaqueMasks-0.80) < 0.01; - #else - const bool isShaderGrass = false; - #endif + vec4 data = texelFetch(colortex1, ivec2(gl_FragCoord.xy), 0); + + // vec4 dataUnpacked0 = vec4(decodeVec2(data.x),decodeVec2(data.y)); // albedo, masks + // vec4 dataUnpacked1 = vec4(decodeVec2(data.z),decodeVec2(data.w)); // normals, lightmaps + float opaqueMasks = decodeVec2(data.w).y; + bool isShaderGrass = abs(opaqueMasks-0.80) < 0.01; + bool opaqueParticles = abs(opaqueMasks-0.85) < 0.01; + vec4 SpecularData = texelFetch(colortex8, ivec2(gl_FragCoord.xy), 0); // vec4 specdataUnpacked0 = vec4(decodeVec2(SpecularData.x),decodeVec2(SpecularData.y)); @@ -32,7 +30,7 @@ vec3 modify_attenuation( float light_dist_inv = inversesqrt(distance_squared); vec3 light_dir = to_light * light_dist_inv; - if(!isShaderGrass && LabSSS < 0.025) { + if(!isShaderGrass && LabSSS < 0.025 && !opaqueParticles) { float NdotGN = dot(light_dir, geometry_normal); if (NdotGN < 0.01f) return vec3(0f); } @@ -40,7 +38,9 @@ vec3 modify_attenuation( float att = 1f / (distance_squared * light.falloff * light.attenuation.y + light.attenuation.x); if(!isShaderGrass) { - att *= clamp(dot(ph_frag_is_hand ? geometry_normal : texture_normal, light_dir), pow(LabSSS, 1.5), 1f); + float attMult = clamp(dot(ph_frag_is_hand ? geometry_normal : texture_normal, light_dir), pow(LabSSS, 1.5), 1f); + if(opaqueParticles) attMult = mix(0.35, 1.0, attMult); + att *= attMult; } return att * light.color; diff --git a/shaders/shaders.properties b/shaders/shaders.properties index df2296d..4055fb5 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -152,8 +152,7 @@ iext.geometry.gbuffers_terrain=false stars=false #endif -particles.before.deferred=false -particles.ordering=after +particles.ordering=mixed #if !(defined TRANSLUCENT_ENTITIES && defined IS_IRIS || defined IRIS_REQUIRES_SEPARATE_ENTITY_DRAWS) program.world0/gbuffers_entities_translucent.enabled = false @@ -220,6 +219,7 @@ blend.gbuffers_basic = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE blend.gbuffers_weather = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE blend.gbuffers_block_translucent = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE blend.gbuffers_entities_translucent = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE +blend.gbuffers_particles_translucent = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE blend.gbuffers_lightning = ONE ONE ONE ZERO blend.gbuffers_spidereyes = ONE ONE ONE ONE blend.gbuffers_armor_glint = ONE ONE ONE ZERO @@ -231,6 +231,7 @@ blend.shadow = ONE ZERO ONE ZERO blend.shadow_entities = ONE ZERO ONE ZERO # Disable blending blend.gbuffers_terrain = off +blend.gbuffers_particles = off blend.gbuffers_hand = off blend.gbuffers_block = off blend.gbuffers_entities = off diff --git a/shaders/world-1/deferred2.fsh b/shaders/world-1/deferred2.fsh new file mode 100644 index 0000000..6dfea7d --- /dev/null +++ b/shaders/world-1/deferred2.fsh @@ -0,0 +1,5 @@ +#version 430 compatibility + +#define NETHER_SHADER + +#include "/dimensions/deferred2.fsh" \ No newline at end of file diff --git a/shaders/world-1/deferred2.vsh b/shaders/world-1/deferred2.vsh new file mode 100644 index 0000000..525737f --- /dev/null +++ b/shaders/world-1/deferred2.vsh @@ -0,0 +1,5 @@ +#version 430 compatibility + +#define NETHER_SHADER + +#include "/dimensions/deferred2.vsh" \ No newline at end of file diff --git a/shaders/world-1/gbuffers_particles.fsh b/shaders/world-1/gbuffers_particles.fsh new file mode 100644 index 0000000..f1ad841 --- /dev/null +++ b/shaders/world-1/gbuffers_particles.fsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define NETHER_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world-1/gbuffers_particles.vsh b/shaders/world-1/gbuffers_particles.vsh new file mode 100644 index 0000000..04e2cfd --- /dev/null +++ b/shaders/world-1/gbuffers_particles.vsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define NETHER_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world-1/gbuffers_particles_translucent.fsh b/shaders/world-1/gbuffers_particles_translucent.fsh new file mode 100644 index 0000000..a56c31e --- /dev/null +++ b/shaders/world-1/gbuffers_particles_translucent.fsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define NETHER_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world-1/gbuffers_particles_translucent.vsh b/shaders/world-1/gbuffers_particles_translucent.vsh new file mode 100644 index 0000000..61b5862 --- /dev/null +++ b/shaders/world-1/gbuffers_particles_translucent.vsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define NETHER_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0/gbuffers_particles.fsh b/shaders/world0/gbuffers_particles.fsh new file mode 100644 index 0000000..2797c00 --- /dev/null +++ b/shaders/world0/gbuffers_particles.fsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0/gbuffers_particles.vsh b/shaders/world0/gbuffers_particles.vsh new file mode 100644 index 0000000..5fe2d75 --- /dev/null +++ b/shaders/world0/gbuffers_particles.vsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0/gbuffers_particles_translucent.fsh b/shaders/world0/gbuffers_particles_translucent.fsh new file mode 100644 index 0000000..0d576a0 --- /dev/null +++ b/shaders/world0/gbuffers_particles_translucent.fsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0/gbuffers_particles_translucent.vsh b/shaders/world0/gbuffers_particles_translucent.vsh new file mode 100644 index 0000000..9027746 --- /dev/null +++ b/shaders/world0/gbuffers_particles_translucent.vsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0_with_aether_flag/gbuffers_particles.fsh b/shaders/world0_with_aether_flag/gbuffers_particles.fsh new file mode 100644 index 0000000..b945b0f --- /dev/null +++ b/shaders/world0_with_aether_flag/gbuffers_particles.fsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER +#define AETHER_FLAG + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0_with_aether_flag/gbuffers_particles.vsh b/shaders/world0_with_aether_flag/gbuffers_particles.vsh new file mode 100644 index 0000000..68d8c34 --- /dev/null +++ b/shaders/world0_with_aether_flag/gbuffers_particles.vsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER +#define AETHER_FLAG + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0_with_aether_flag/gbuffers_particles_translucent.fsh b/shaders/world0_with_aether_flag/gbuffers_particles_translucent.fsh new file mode 100644 index 0000000..f0161c8 --- /dev/null +++ b/shaders/world0_with_aether_flag/gbuffers_particles_translucent.fsh @@ -0,0 +1,8 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER +#define AETHER_FLAG + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0_with_aether_flag/gbuffers_particles_translucent.vsh b/shaders/world0_with_aether_flag/gbuffers_particles_translucent.vsh new file mode 100644 index 0000000..1971949 --- /dev/null +++ b/shaders/world0_with_aether_flag/gbuffers_particles_translucent.vsh @@ -0,0 +1,8 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER +#define AETHER_FLAG + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0_with_twilight_forest_flag/gbuffers_particles.fsh b/shaders/world0_with_twilight_forest_flag/gbuffers_particles.fsh new file mode 100644 index 0000000..402a1fd --- /dev/null +++ b/shaders/world0_with_twilight_forest_flag/gbuffers_particles.fsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER +#define TWILIGHT_FOREST_FLAG + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0_with_twilight_forest_flag/gbuffers_particles.vsh b/shaders/world0_with_twilight_forest_flag/gbuffers_particles.vsh new file mode 100644 index 0000000..9f4de09 --- /dev/null +++ b/shaders/world0_with_twilight_forest_flag/gbuffers_particles.vsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define OVERWORLD_SHADER +#define TWILIGHT_FOREST_FLAG + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.fsh b/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.fsh new file mode 100644 index 0000000..69b07a8 --- /dev/null +++ b/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.fsh @@ -0,0 +1,8 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER +#define TWILIGHT_FOREST_FLAG + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.vsh b/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.vsh new file mode 100644 index 0000000..819afee --- /dev/null +++ b/shaders/world0_with_twilight_forest_flag/gbuffers_particles_translucent.vsh @@ -0,0 +1,8 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define OVERWORLD_SHADER +#define TWILIGHT_FOREST_FLAG + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world1/deferred2.fsh b/shaders/world1/deferred2.fsh new file mode 100644 index 0000000..1beba7d --- /dev/null +++ b/shaders/world1/deferred2.fsh @@ -0,0 +1,5 @@ +#version 430 compatibility + +#define END_SHADER + +#include "/dimensions/deferred2.fsh" \ No newline at end of file diff --git a/shaders/world1/deferred2.vsh b/shaders/world1/deferred2.vsh new file mode 100644 index 0000000..697a716 --- /dev/null +++ b/shaders/world1/deferred2.vsh @@ -0,0 +1,5 @@ +#version 430 compatibility + +#define END_SHADER + +#include "/dimensions/deferred2.vsh" \ No newline at end of file diff --git a/shaders/world1/gbuffers_particles.fsh b/shaders/world1/gbuffers_particles.fsh new file mode 100644 index 0000000..58501ae --- /dev/null +++ b/shaders/world1/gbuffers_particles.fsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define END_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world1/gbuffers_particles.vsh b/shaders/world1/gbuffers_particles.vsh new file mode 100644 index 0000000..f4a53b8 --- /dev/null +++ b/shaders/world1/gbuffers_particles.vsh @@ -0,0 +1,6 @@ +#version 430 compatibility + +#define PARTICLES_SOLID +#define END_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world1/gbuffers_particles_translucent.fsh b/shaders/world1/gbuffers_particles_translucent.fsh new file mode 100644 index 0000000..621c1a4 --- /dev/null +++ b/shaders/world1/gbuffers_particles_translucent.fsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define END_SHADER + +#include "/dimensions/all_particles.fsh" diff --git a/shaders/world1/gbuffers_particles_translucent.vsh b/shaders/world1/gbuffers_particles_translucent.vsh new file mode 100644 index 0000000..d2a8902 --- /dev/null +++ b/shaders/world1/gbuffers_particles_translucent.vsh @@ -0,0 +1,7 @@ +#version 430 compatibility + +#define PARTICLES +#define PARTICLES_TRANSLUCENT +#define END_SHADER + +#include "/dimensions/all_particles.vsh" diff --git a/shaders/world1/shadow.vsh b/shaders/world1/shadow.vsh index d2179cc..cf88e80 100644 --- a/shaders/world1/shadow.vsh +++ b/shaders/world1/shadow.vsh @@ -31,6 +31,9 @@ out DATA { #include "/lib/entities.glsl" #endif +#include "/lib/blocks.glsl" + + #if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS in vec4 mc_Entity; #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE @@ -46,12 +49,10 @@ out DATA { uniform int currentRenderedItemId; uniform int blockEntityId; - #include "/lib/blocks.glsl" #include "/lib/voxel_common.glsl" #include "/lib/voxel_write.glsl" #endif - //#include "/lib/Shadow_Params.glsl" // uniform int entityId; @@ -90,6 +91,8 @@ void main() { gl_Position = customShadowPerspectiveSSBO * customShadowMatrixSSBO * vec4(feetPlayerPos, 1.0); gl_Position.z /= 6.0; + + if(mc_Entity.x == BLOCK_WATER) gl_Position = vec4(-1.0); #else gl_Position = vec4(-1.0); #endif