item/entity light fixes

This commit is contained in:
NULL511 2024-05-07 10:53:28 -04:00
parent 0c88744e8d
commit 8c8531701b
10 changed files with 67 additions and 33 deletions

View File

@ -393,7 +393,7 @@ block.321=yellow_stained_glass yellow_stained_glass_pane
####### ----- LPV shapes ----- #######
block.401=chain ladder lever tripwire_hook snow:layers=1 candle:lit=false black_candle:lit=false blue_candle:lit=false brown_candle:lit=false cyan_candle:lit=false gray_candle:lit=false green_candle:lit=false light_blue_candle:lit=false light_gray_candle:lit=false lime_candle:lit=false magenta_candle:lit=false orange_candle:lit=false pink_candle:lit=false purple_candle:lit=false red_candle:lit=false white_candle:lit=false yellow_candle:lit=false acacia_button bamboo_button birch_button cherry_button crimson_button dark_oak_button jungle_button mangrove_button oak_button polished_blackstone_button spruce_button stone_button warped_button
block.401=chain ladder lever tripwire tripwire_hook snow:layers=1 candle:lit=false black_candle:lit=false blue_candle:lit=false brown_candle:lit=false cyan_candle:lit=false gray_candle:lit=false green_candle:lit=false light_blue_candle:lit=false light_gray_candle:lit=false lime_candle:lit=false magenta_candle:lit=false orange_candle:lit=false pink_candle:lit=false purple_candle:lit=false red_candle:lit=false white_candle:lit=false yellow_candle:lit=false acacia_button bamboo_button birch_button cherry_button crimson_button dark_oak_button jungle_button mangrove_button oak_button polished_blackstone_button spruce_button stone_button warped_button
block.402=black_carpet blue_carpet brown_carpet cyan_carpet gray_carpet green_carpet light_blue_carpet light_gray_carpet lime_carpet magenta_carpet moss_carpet orange_carpet pink_carpet purple_carpet red_carpet white_carpet yellow_carpet

View File

@ -3,9 +3,9 @@ layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
const ivec3 workGroups = ivec3(6, 6, 1);
#ifdef IS_LPV_ENABLED
#include "/lib/blocks.glsl"
#include "/lib/items.glsl"
// #include "/lib/entities.glsl"
#include "/lib/blocks.glsl"
#include "/lib/entities.glsl"
#include "/lib/lpv_blocks.glsl"
const vec3 LightColor_Amethyst = vec3(0.464, 0.227, 0.788);
@ -42,7 +42,7 @@ const ivec3 workGroups = ivec3(6, 6, 1);
void main() {
#ifdef IS_LPV_ENABLED
int blockId = int(gl_GlobalInvocationID.x + gl_GlobalInvocationID.y * 32);
int blockId = int(gl_GlobalInvocationID.x + gl_GlobalInvocationID.y * 48);
if (blockId >= 2048) return;
vec3 lightColor = vec3(0.0);
@ -995,6 +995,34 @@ void main() {
mixWeight = 0.9;
}
// Entities
if (blockId == ENTITY_BLAZE) {
lightColor = vec3(1.000, 0.592, 0.000);
lightRange = 8.0;
}
if (blockId == ENTITY_END_CRYSTAL) {
lightColor = vec3(1.000, 0.000, 1.000);
lightRange = 8.0;
}
if (blockId == ENTITY_MAGMA_CUBE) {
lightColor = vec3(0.747, 0.323, 0.110);
lightRange = 9.0;
}
if (blockId == ENTITY_TNT) {
lightColor = vec3(1.0);
lightRange = 8.0;
}
if (blockId == ENTITY_SPECTRAL_ARROW) {
lightColor = vec3(0.0, 1.0, 0.0);
lightRange = 8.0;
mixWeight = 1.0;
}
// hack to increase light (if set)
if (lightRange > 0.0) lightRange += 1.0;

View File

@ -1,34 +1,36 @@
entity.1201=player
entity.1601=player
entity.1202=minecraft:lightning_bolt weather2:lightning_bolt
entity.1602=minecraft:lightning_bolt weather2:lightning_bolt
## misc stuff
entity.1203=blaze
entity.1603=blaze
entity.1204=ender_dragon wither
entity.1604=ender_dragon wither
entity.1205=item_frame item_display
entity.1605=end_crystal
entity.1206=magma_cube
entity.1606=item_frame item_display
entity.1207=tnt firework_rocket
entity.1607=magma_cube
entity.1208=spectral_arrow bigglobe:torch_arrow
entity.1608=tnt firework_rocket
entity.1609=spectral_arrow bigglobe:torch_arrow
################################################
###### SUB-SURFACE SCATTERING
################################################
## medium sss (same as strong sss for blocks)
entity.1401=giant ghast elder_guardian
entity.1801=giant ghast elder_guardian
## weak sss (same as weak sss for blocks)
entity.1402=furnace_minecart sheep frog chicken iron_golem 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 creeper drowned endermite evoker guardian hoglin husk phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager trader_llama
entity.1802=furnace_minecart sheep frog chicken iron_golem 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 creeper drowned endermite evoker guardian hoglin husk phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager trader_llama
#removed: player blaze magma_cube
################################################
###### REFLECTIVE TRANSLUCENTS
################################################
entity.1403=slime
entity.1803=slime

View File

@ -1,11 +1,12 @@
#define ENTITY_PLAYER 1201
#define ENTITY_LIGHTNING 1202
#define ENTITY_BLAZE 1203
#define ENTITY_DRAGON_WITHER 1204
#define ENTITY_ITEM_FRAME 1205
#define ENTITY_MAGMA_CUBE 1206
#define ENTITY_TNT 1207
#define ENTITY_SPECTRAL_ARROW 1208
#define ENTITY_SSS_MEDIUM 1401
#define ENTITY_SSS_WEAK 1402
#define ENTITY_SLIME 1403
#define ENTITY_PLAYER 1601
#define ENTITY_LIGHTNING 1602
#define ENTITY_BLAZE 1603
#define ENTITY_DRAGON_WITHER 1604
#define ENTITY_END_CRYSTAL 1605
#define ENTITY_ITEM_FRAME 1606
#define ENTITY_MAGMA_CUBE 1607
#define ENTITY_TNT 1608
#define ENTITY_SPECTRAL_ARROW 1609
#define ENTITY_SSS_MEDIUM 1801
#define ENTITY_SSS_WEAK 1802
#define ENTITY_SLIME 1803

View File

@ -687,7 +687,7 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
#define LPV_REDSTONE_LIGHTS
//#define LPV_COLORED_CANDLES
#define LPV_NOSHADOW_HACK
// #define LPV_NOSHADOW_HACK
#ifdef LPV_ENABLED
#ifdef IRIS_FEATURE_CUSTOM_IMAGES

View File

@ -577,7 +577,7 @@ block.*= vine
####### ----- LPV shapes ----- #######
#= BLOCK_LPV_IGNORE
block.401= chain ladder lever tripwire_hook \
block.401= chain ladder lever tripwire tripwire_hook \
snow:layers=1 \
[candle]:lit=false \
acacia_button bamboo_button birch_button cherry_button crimson_button dark_oak_button jungle_button mangrove_button oak_button polished_blackstone_button spruce_button stone_button warped_button

View File

@ -1,5 +1,5 @@
#= ENTITY_PLAYER
entity.1201= player
entity.1601= player
#= ENTITY_LIGHTNING
entity.*= minecraft:lightning_bolt weather2:lightning_bolt
@ -12,6 +12,9 @@ entity.*= blaze
#= ENTITY_DRAGON_WITHER
entity.*= ender_dragon wither
#= ENTITY_END_CRYSTAL
entity.*= end_crystal
#= ENTITY_ITEM_FRAME
entity.*= item_frame item_display
@ -30,7 +33,7 @@ entity.*= spectral_arrow bigglobe:torch_arrow
## medium sss (same as strong sss for blocks)
#= ENTITY_SSS_MEDIUM
entity.1401 = giant ghast elder_guardian
entity.1801 = giant ghast elder_guardian
## weak sss (same as weak sss for blocks)
#= ENTITY_SSS_WEAK

View File

@ -72,7 +72,7 @@ void main() {
case ENTITY_BLAZE:
case ENTITY_MAGMA_CUBE:
case ENTITY_SPECTRAL_ARROW:
voxelId = uint(BLOCK_TORCH);
voxelId = uint(entityId);
break;
}
}

View File

@ -221,7 +221,7 @@ void main() {
case ENTITY_BLAZE:
case ENTITY_MAGMA_CUBE:
case ENTITY_SPECTRAL_ARROW:
voxelId = uint(BLOCK_TORCH);
voxelId = uint(entityId);
break;
}
}

View File

@ -72,7 +72,7 @@ void main() {
case ENTITY_BLAZE:
case ENTITY_MAGMA_CUBE:
case ENTITY_SPECTRAL_ARROW:
voxelId = uint(BLOCK_TORCH);
voxelId = uint(entityId);
break;
}
}