fix lightning bolts, ensure POM cannot interact with item frames and signs.

This commit is contained in:
Xonk 2023-06-28 15:34:23 -04:00
parent d46a423c50
commit e22f5f402d
6 changed files with 19 additions and 9 deletions

View File

@ -3,8 +3,7 @@
block.2200 = minecraft:oak_sign minecraft:spruce_sign minecraft:birch_sign minecraft:jungle_sign minecraft:acacia_sign minecraft:dark_oak_sign minecraft:mangrove_sign minecraft:crimson_sign minecraft:warped_sign minecraft:oak_wall_sign minecraft:spruce_wall_sign minecraft:birch_wall_sign minecraft:jungle_wall_sign minecraft:acacia_wall_sign minecraft:dark_wall_oak_sign minecraft:mangrove_wall_sign minecraft:crimson_wall_sign minecraft:warped_wall_sign block.2200 = minecraft:oak_sign minecraft:spruce_sign minecraft:birch_sign minecraft:jungle_sign minecraft:acacia_sign minecraft:dark_oak_sign minecraft:mangrove_sign minecraft:crimson_sign minecraft:warped_sign minecraft:oak_wall_sign minecraft:spruce_wall_sign minecraft:birch_wall_sign minecraft:jungle_wall_sign minecraft:acacia_wall_sign minecraft:dark_wall_oak_sign minecraft:mangrove_wall_sign minecraft:crimson_wall_sign minecraft:warped_wall_sign
block.2100 = minecraft:end_portal block.2100 = minecraft:end_portal
####### ----- SSS and waving ----- ####### ####### ----- SSS and waving ----- #######

View File

@ -1155,7 +1155,9 @@ void main() {
if(lightningBolt) FINAL_COLOR.rgb += vec3(Lightning_R,Lightning_G,Lightning_B) * 255.0; if(lightningBolt) FINAL_COLOR.rgb += vec3(Lightning_R,Lightning_G,Lightning_B) * 255.0;
gl_FragData[0].rgb = FINAL_COLOR;
gl_FragData[0].rgb = FINAL_COLOR ;
// if(LabSSS > 0.0) gl_FragData[0].rgb = vec3(0,25,0); // if(LabSSS > 0.0) gl_FragData[0].rgb = vec3(0,25,0);
} }

View File

@ -97,6 +97,7 @@ void main() {
pos = normalize(vec3(0,1,0)); pos = normalize(vec3(0,1,0));
} }
/// TOOO DAMN BLUE
// // only need to sample one spot for this // // only need to sample one spot for this
// averageSkyCol += 2.0*skyFromTex(normalize(vec3(0.0,1.0,0.0)),colortex4).rgb/150.; // averageSkyCol += 2.0*skyFromTex(normalize(vec3(0.0,1.0,0.0)),colortex4).rgb/150.;

View File

@ -8,4 +8,6 @@ entity.1100 = slime giant ender_dragon ghast sheep
#weak sss (same as weak sss for blocks) #weak sss (same as weak sss for blocks)
entity.1200 = player frog chicken snow_golem polar_bear zombie_horse armor_stand arrow squid bat cat cod cow donkey fox horse mooshroom mule ocelot parrot pig piglin polar_bear pufferfish rabbit salmon strider tropical_fish turtle villager wandering_trader bee cave_spider dolphin enderman llama panda spider wolf zombified_piglin blaze creeper drowned elder_gaurdian endermite evoker guardian hoglin husk magma_cube phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager wither trader_llama entity.1200 = player frog chicken snow_golem polar_bear zombie_horse armor_stand arrow squid bat cat cod cow donkey fox horse mooshroom mule ocelot parrot pig piglin polar_bear pufferfish rabbit salmon strider tropical_fish turtle villager wandering_trader bee cave_spider dolphin enderman llama panda spider wolf zombified_piglin blaze creeper drowned elder_gaurdian endermite evoker guardian hoglin husk magma_cube phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager wither trader_llama
entity.12345 = minecraft:lightning_bolt weather2:lightning_bolt entity.12345 = minecraft:lightning_bolt weather2:lightning_bolt
entity.2300 = minecraft:item_frame minecraft:item_display

View File

@ -396,9 +396,12 @@ void main() {
vec3 viewVector = normalize(tbnMatrix*fragpos); vec3 viewVector = normalize(tbnMatrix*fragpos);
float dist = length(fragpos); float dist = length(fragpos);
float maxdist = MAX_OCCLUSION_DISTANCE;
if(!ifPOM) maxdist = 0.0;
gl_FragDepth = gl_FragCoord.z; gl_FragDepth = gl_FragCoord.z;
if (dist < MAX_OCCLUSION_DISTANCE) { if (dist < maxdist) {
float depthmap = readNormal(vtexcoord.st).a; float depthmap = readNormal(vtexcoord.st).a;
float used_POM_DEPTH = 1.0; float used_POM_DEPTH = 1.0;
@ -448,6 +451,7 @@ void main() {
vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM) * color; vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM) * color;
if(LIGHTNING > 0) Albedo = vec4(1);
// float ENDPORTAL_EFFECT = PORTAL > 0 ? EndPortalEffect(Albedo, fragpos, worldpos, tbnMatrix) : 0; // float ENDPORTAL_EFFECT = PORTAL > 0 ? EndPortalEffect(Albedo, fragpos, worldpos, tbnMatrix) : 0;
#ifdef WhiteWorld #ifdef WhiteWorld
@ -490,6 +494,7 @@ void main() {
else Albedo.a = 0.0; else Albedo.a = 0.0;
#endif #endif
//////////////////////////////// //////////////////////////////// //////////////////////////////// ////////////////////////////////
//////////////////////////////// NORMAL //////////////////////////////// //////////////////////////////// NORMAL ////////////////////////////////
//////////////////////////////// //////////////////////////////// //////////////////////////////// ////////////////////////////////

View File

@ -226,16 +226,17 @@ void main() {
if(blockEntityId == 2200) SIGN = 1; if(blockEntityId == 2200) SIGN = 1;
if(blockEntityId == 2100) PORTAL = 1; if(blockEntityId == 2100) PORTAL = 1;
#endif #endif
NameTags = 0; NameTags = 0;
PHYSICSMOD_SNOW = 0; PHYSICSMOD_SNOW = 0;
#ifdef ENTITIES #ifdef ENTITIES
#ifdef ENTITY_PHYSICSMOD_SNOW #ifdef ENTITY_PHYSICSMOD_SNOW
if(entityId == 829925) PHYSICSMOD_SNOW = 1; if(entityId == 829925) PHYSICSMOD_SNOW = 1;
#endif #endif
if(entityId == 2300) SIGN = 1;
// try and single out nametag text and then discard nametag background // try and single out nametag text and then discard nametag background
// if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1; // if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1;