From 4345e0560e9bc093b516750a4c4aefaa3ef13d2d Mon Sep 17 00:00:00 2001 From: Xonk Date: Fri, 23 Jun 2023 13:40:15 -0400 Subject: [PATCH] material mask for entities so snow doesnt go on them --- shaders/composite1.fsh | 10 +++++----- shaders/entity.properties | 4 +--- shaders/gbuffers_all_solid.vsh | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index 2ea0cde..9da574e 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -822,10 +822,10 @@ void main() { bool lightningBolt = abs(dataUnpacked1.w-0.5) <0.01; - - bool translucent2 = abs(dataUnpacked1.w-0.6) <0.01; // Weak translucency - bool translucent3 = abs(dataUnpacked1.w-0.55) <0.01; // all blocks - bool translucent4 = abs(dataUnpacked1.w-0.65) <0.01; // Weak translucency + bool boatMask = abs(dataUnpacked1.w-0.6) <0.01; + // bool translucent2 = abs(dataUnpacked1.w-0.6) <0.01; // Weak translucency + // bool translucent3 = abs(dataUnpacked1.w-0.55) <0.01; // all blocks + // 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; @@ -1110,7 +1110,7 @@ void main() { SnowPatches = mix(0.0, SnowPatches, WinterTimeForSnow); - if(!hand && !iswater){ + if(!hand && !iswater && !entities && isEyeInWater == 0){ albedo = mix(albedo, vec3(0.8,0.9,1.0), SnowPatches); SpecularTex.rg = mix(SpecularTex.rg, vec2(1,0.05), SnowPatches); } diff --git a/shaders/entity.properties b/shaders/entity.properties index 9fceb65..684ed49 100644 --- a/shaders/entity.properties +++ b/shaders/entity.properties @@ -10,6 +10,4 @@ entity.1200 = player frog chicken snow_golem polar_bear zombie_horse armor_s entity.12345 = minecraft:lightning_bolt - -# entity.9001 = minecraft:boat -# layer.translucent = slime \ No newline at end of file +entity.2468 = minecraft:boat \ No newline at end of file diff --git a/shaders/gbuffers_all_solid.vsh b/shaders/gbuffers_all_solid.vsh index eb658e8..0498f20 100644 --- a/shaders/gbuffers_all_solid.vsh +++ b/shaders/gbuffers_all_solid.vsh @@ -214,7 +214,6 @@ void main() { NameTags = 0; PHYSICSMOD_SNOW = 0; - #ifdef ENTITIES #ifdef ENTITY_PHYSICSMOD_SNOW @@ -227,6 +226,7 @@ PHYSICSMOD_SNOW = 0; // if(gl_Color.a < 1.0) NameTags = 1; // if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1); + if(entityId == 1100 || entityId == 1200 || entityId == 2468) normalMat.a = 0.45; #endif