diff --git a/shaders/block.properties b/shaders/block.properties index 290af81..cc34256 100644 --- a/shaders/block.properties +++ b/shaders/block.properties @@ -15,7 +15,7 @@ block.10004 = minecraft:flowering_azalea minecraft:tall_seagrass minecraft:seagrass minecraft:kelp minecraft:large_fern:half=lower minecraft:tall_grass minecraft:tall_seagrass minecraft:kelp_plant minecraft:peony minecraft:rose_bush minecraft:lilac minecraft:sunflower:half=lower minecraft:packed_ice minecraft:blue_ice minecraft:melon_stem minecraft:pumpkin_stem minecraft:attached_melon_stem minecraft:attached_pumpkin_stem minecraft:lily_pad westerosblocks:blackberry_bush westerosblocks:blueberry_bush westerosblocks:raspberry_bush westerosblocks:juniper_bush westerosblocks:red_rose_bush westerosblocks:pink_rose_bush westerosblocks:white_rose_bush westerosblocks:yellow_rose_bush westerosblocks:yellow_wildflowers westerosblocks:green_spiny_herb westerosblocks:green_leafy_herb westerosblocks:orange_marigolds westerosblocks:orange_trollius westerosblocks:blue_forgetmenots westerosblocks:pink_wildflowers westerosblocks:yellow_tansy westerosblocks:blue_flax westerosblocks:white_daisies westerosblocks:yellow_daisies westerosblocks:green_scrub_grass westerosblocks:dead_scrub_grass westerosblocks:yellow_bedstraw westerosblocks:orange_bells westerosblocks:blue_bells westerosblocks:blue_swamp_bells westerosblocks:yellow_buttercups westerosblocks:orange_bog_asphodel westerosblocks:yellow_lupine westerosblocks:blue_hyacinth westerosblocks:pink_thistle westerosblocks:yellow_dandelions westerosblocks:yellow_daffodils westerosblocks:yellow_roses westerosblocks:strawberry_bush westerosblocks:white_lilyofthevalley westerosblocks:yellow_bells westerosblocks:yellow_sunflower westerosblocks:white_roses westerosblocks:red_dark_roses westerosblocks:yellow_hellebore westerosblocks:meadow_fescue westerosblocks:red_poppies westerosblocks:red_roses westerosblocks:purple_pansies westerosblocks:purple_roses westerosblocks:orange_sun_star westerosblocks:pink_primrose westerosblocks:red_aster westerosblocks:blue_chicory westerosblocks:red_flowering_spiny_herb westerosblocks:purple_foxglove westerosblocks:pink_allium westerosblocks:purple_violets westerosblocks:white_chamomile westerosblocks:red_tulips westerosblocks:white_peony westerosblocks:purple_alpine_sowthistle westerosblocks:red_carnations westerosblocks:magenta_roses westerosblocks:red_chrysanthemum westerosblocks:blue_orchid westerosblocks:yellow_rudbeckia westerosblocks:pink_tulips westerosblocks:cranberry_bush westerosblocks:purple_lavender westerosblocks:red_sourleaf_bush westerosblocks:pink_sweet_peas westerosblocks:red_sorrel westerosblocks:pink_roses westerosblocks:unshaded_grass westerosblocks:cow_parsely westerosblocks:bracken westerosblocks:lady_fern westerosblocks:nettle westerosblocks:dead_bracken westerosblocks:fireweed westerosblocks:heather westerosblocks:red_fern westerosblocks:dock_leaf westerosblocks:jasmine_vines westerosblocks:dappled_moss westerosblocks:cushion_moss_wall westerosblocks:hemp_short westerosblocks:hemp_tall westerosblocks:hemp_dense westerosblocks:crop_carrots westerosblocks:crop_wheat westerosblocks:crop_turnips westerosblocks:crop_peas westerosblocks:cattails westerosblocks:jungle_tall_fern westerosblocks:jungle_tall_grass westerosblocks:savanna_tall_grass \ ## weak sss - block.10006 = minecraft:amethyst_block minecraft:budding_amethyst minecraft:small_amethyst_bud minecraft:medium_amethyst_bud minecraft:large_amethyst_bud minecraft:amethyst_cluster minecraft:pitcher_plant minecraft:small_dripleaf minecraft:grass_block:snowy=true minecraft:snow_block minecraft:snow powder_snow cobweb red_mushroom_block brown_mushroom_block weeping_vines weeping_vines_plant twisting_vines twisting_vines_plant vine tube_coral tube_coral_block tube_coral_fan tube_coral_wall_fan horn_coral horn_coral_block horn_coral_fan horn_coral_wall_fan fire_coral fire_coral_block fire_coral_fan fire_coral_wall_fan dead_brain_coral dead_brain_coral_block dead_brain_coral_fan dead_brain_coral_wall_fan dead_bubble_coral dead_bubble_coral_block dead_bubble_coral_fan dead_bubble_coral_wall_fan dead_bush dead_fire_coral dead_fire_coral_block dead_fire_coral_fan dead_fire_coral_wall_fan dead_horn_coral dead_horn_coral_block dead_horn_coral_fan dead_horn_coral_wall_fan dead_tube_coral dead_tube_coral_block dead_tube_coral_fan dead_tube_coral_wall_fan bubble_coral bubble_coral_block bubble_coral_fan bubble_coral_wall_fan brain_coral brain_coral_block brain_coral_fan brain_coral_wall_fan bamboo bamboo_sapling minecraft:spore_blossom minecraft:cave_vines minecraft:cave_vines_plant minecraft:glow_lichen minecraft:melon minecraft:pumpkin minecraft:big_dripleaf minecraft:big_dripleaf_stem minecraft:cactus minecraft:hay_block minecraft:brown_mushroom minecraft:mushroom_stem minecraft:sugar_cane minecraft:crimson_fungus minecraft:warped_fungus minecraft:sea_pickle minecraft:honeycomb_block + block.10006 = minecraft:amethyst_block minecraft:budding_amethyst minecraft:small_amethyst_bud minecraft:medium_amethyst_bud minecraft:large_amethyst_bud minecraft:amethyst_cluster minecraft:pitcher_plant minecraft:small_dripleaf minecraft:grass_block:snowy=true minecraft:snow_block minecraft:snow powder_snow cobweb red_mushroom_block brown_mushroom_block weeping_vines weeping_vines_plant twisting_vines twisting_vines_plant vine tube_coral tube_coral_block tube_coral_fan tube_coral_wall_fan horn_coral horn_coral_block horn_coral_fan horn_coral_wall_fan fire_coral fire_coral_block fire_coral_fan fire_coral_wall_fan dead_brain_coral dead_brain_coral_block dead_brain_coral_fan dead_brain_coral_wall_fan dead_bubble_coral dead_bubble_coral_block dead_bubble_coral_fan dead_bubble_coral_wall_fan dead_bush dead_fire_coral dead_fire_coral_block dead_fire_coral_fan dead_fire_coral_wall_fan dead_horn_coral dead_horn_coral_block dead_horn_coral_fan dead_horn_coral_wall_fan dead_tube_coral dead_tube_coral_block dead_tube_coral_fan dead_tube_coral_wall_fan bubble_coral bubble_coral_block bubble_coral_fan bubble_coral_wall_fan brain_coral brain_coral_block brain_coral_fan brain_coral_wall_fan bamboo bamboo_sapling minecraft:spore_blossom minecraft:cave_vines minecraft:cave_vines_plant minecraft:glow_lichen minecraft:melon minecraft:pumpkin minecraft:big_dripleaf minecraft:big_dripleaf_stem minecraft:cactus minecraft:hay_block minecraft:brown_mushroom minecraft:mushroom_stem minecraft:sugar_cane minecraft:crimson_fungus minecraft:warped_fungus minecraft:sea_pickle:waterlogged=false minecraft:honeycomb_block ## weak sss block.200 = minecraft:white_wool minecraft:orange_wool minecraft:magenta_wool minecraft:light_blue_wool minecraft:yellow_wool minecraft:lime_wool minecraft:pink_wool minecraft:gray_wool minecraft:light_gray_wool minecraft:cyan_wool minecraft:purple_wool minecraft:blue_wool minecraft:brown_wool minecraft:green_wool minecraft:red_wool minecraft:black_wool minecraft:orange_carpet minecraft:magenta_carpet minecraft:light_blue_carpet minecraft:yellow_carpet minecraft:lime_carpet minecraft:pink_carpet minecraft:gray_carpet minecraft:light_gray_carpet minecraft:cyan_carpet minecraft:purple_carpet minecraft:blue_carpet minecraft:brown_carpet minecraft:green_carpet minecraft:red_carpet minecraft:black_carpet westerosblocks:clothesline westerosblocks:smoke westerosblocks:brown_mushroom_1 westerosblocks:brown_mushroom_2 westerosblocks:brown_mushroom_3 westerosblocks:brown_mushroom_4 westerosblocks:brown_mushroom_5 westerosblocks:brown_mushroom_6 westerosblocks:brown_mushroom_7 westerosblocks:brown_mushroom_8 westerosblocks:brown_mushroom_9 westerosblocks:brown_mushroom_10 westerosblocks:brown_mushroom_11 westerosblocks:brown_mushroom_12 westerosblocks:brown_mushroom_13 westerosblocks:red_mushroom_1 westerosblocks:red_mushroom_2 westerosblocks:red_mushroom_3 westerosblocks:red_mushroom_4 westerosblocks:red_mushroom_5 westerosblocks:red_mushroom_6 westerosblocks:red_mushroom_7 westerosblocks:red_mushroom_8 westerosblocks:red_mushroom_9 westerosblocks:white_wool_slab westerosblocks:orange_wool_slab westerosblocks:light_brown_wool_slab westerosblocks:light_blue_wool_slab westerosblocks:yellow_wool_slab westerosblocks:dirty_white_wool_slab westerosblocks:pink_wool_slab westerosblocks:grey_wool_slab westerosblocks:light_grey_wool_slab westerosblocks:cyan_wool_slab westerosblocks:purple_wool_slab westerosblocks:blue_wool_slab westerosblocks:brown_wool_slab westerosblocks:green_wool_slab westerosblocks:red_wool_slab westerosblocks:black_wool_slab westerosblocks:white_wool_carpet westerosblocks:orange_wool_carpet westerosblocks:light_brown_wool_carpet westerosblocks:light_blue_wool_carpet westerosblocks:yellow_wool_carpet westerosblocks:dirty_white_wool_carpet westerosblocks:pink_wool_carpet westerosblocks:grey_wool_carpet westerosblocks:light_grey_wool_carpet westerosblocks:cyan_wool_carpet westerosblocks:purple_wool_carpet westerosblocks:blue_wool_carpet westerosblocks:brown_wool_carpet westerosblocks:green_wool_carpet westerosblocks:red_wool_carpet westerosblocks:black_wool_carpet westerosblocks:thatch_light_fur_carpet westerosblocks:thatch_dark_fur_carpet @@ -30,32 +30,44 @@ block.10008 = minecraft:grass_block:snowy=false ####### ----- lightsources ----- ####### - #block.10005 = minecraft:sculk_sensor:sculk_sensor_phase=active minecraft:soul_fire minecraft:soul_campfire:lit=true minecraft:cave_vines_plant:berries=true minecraft:soul_lantern minecraft:soul_torch minecraft:soul_wall_torch minecraft:conduit minecraft:beacon minecraft:sea_pickle minecraft:respawn_anchor:charges=4 minecraft:smoker:lit=true minecraft:sea_lantern minecraft:cave_vines:berries=true minecraft:glowstone minecraft:torch minecraft:wall_torch minecraft:lava minecraft:fire minecraft:redstone_torch minecraft:redstone_wall_torch minecraft:jack_o_lantern minecraft:magma_block minecraft:redstone_lamp:lit=true minecraft:lantern minecraft:campfire:lit=true minecraft:shroomlight minecraft:end_rod minecraft:end_gateway minecraft:lava minecraft:fire westerosblocks:safe_fire conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:iron_candelabrum_1 conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light - block.1000 = cave_vines_plant:berries=true cave_vines:berries=true - block.1001 = soul_fire soul_campfire:lit=true - block.1002 = soul_lantern - block.1003 = soul_torch soul_wall_torch - block.1004 = conduit - block.1005 = beacon - block.1006 = sea_pickle - block.1007 = respawn_anchor:charges=4 - block.1008 = smoker:lit=true - block.1009 = sea_lantern + block.1001 = beacon + block.1002 = cave_vines_plant:berries=true cave_vines:berries=true + block.1003 = conduit + block.1004 = end_gateway + block.1005 = end_rod + block.1006 = fire campfire:lit=true + block.1007 = ochre_froglight + block.1008 = pearlescent_froglight + block.1009 = verdant_froglight block.1010 = glowstone - block.1011 = torch wall_torch - block.1012 = lava - block.1013 = fire - block.1014 = redstone_torch redstone_wall_torch - block.1015 = jack_o_lantern - block.1016 = magma_block - block.1017 = redstone_lamp:lit=true - block.1018 = lantern - block.1019 = campfire:lit=true - block.1020 = shroomlight - block.1021 = end_rod minecraft:end_gateway westerosblocks:safe_fire conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:iron_candelabrum_1 conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light + block.1011 = jack_o_lantern + block.1012 = lantern + block.1013 = lava + block.1014 = magma_block + block.1015 = redstone_lamp:lit=true + block.1016 = redstone_torch:lit=true redstone_wall_torch:lit=true + block.1017 = respawn_anchor:charges=4 + block.1018 = sculk_sensor:sculk_sensor_phase=active + block.1019 = sea_pickle:waterlogged=true:pickles=1 + block.1020 = sea_pickle:waterlogged=true:pickles=2 + block.1021 = sea_pickle:waterlogged=true:pickles=3 + block.1022 = sea_pickle:waterlogged=true:pickles=4 + block.1023 = sea_lantern + block.1024 = shroomlight + block.1025 = smoker:lit=true + block.1026 = soul_fire soul_campfire:lit=true + block.1027 = soul_lantern + block.1028 = soul_torch soul_wall_torch + block.1029 = torch wall_torch + + block.1100 = westerosblocks:safe_fire + block.1101 = conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:iron_candelabrum_1 conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light ####### ----- reflective translucents / glass ----- ####### - block.10002 = minecraft:slime_block minecraft:nether_portal minecraft:honey_block ice minecraft:frosted_ice minecraft:black_stained_glass minecraft:black_stained_glass_pane minecraft:blue_stained_glass minecraft:blue_stained_glass_pane minecraft:brown_stained_glass minecraft:brown_stained_glass_pane minecraft:cyan_stained_glass minecraft:cyan_stained_glass_pane minecraft:gray_stained_glass minecraft:gray_stained_glass_pane minecraft:green_stained_glass minecraft:green_stained_glass_pane minecraft:light_blue_stained_glass minecraft:light_blue_stained_glass_pane minecraft:light_gray_stained_glass minecraft:light_gray_stained_glass_pane minecraft:lime_stained_glass minecraft:lime_stained_glass_pane minecraft:magenta_stained_glass minecraft:magenta_stained_glass_pane minecraft:orange_stained_glass minecraft:orange_stained_glass_pane minecraft:pink_stained_glass minecraft:pink_stained_glass_pane minecraft:purple_stained_glass minecraft:purple_stained_glass_pane minecraft:red_stained_glass minecraft:red_stained_glass_pane minecraft:white_stained_glass minecraft:white_stained_glass_pane minecraft:yellow_stained_glass minecraft:yellow_stained_glass_pane minecraft:glass_pane minecraft:glass + # block.10002 = minecraft:slime_block minecraft:nether_portal minecraft:honey_block ice minecraft:frosted_ice minecraft:black_stained_glass minecraft:black_stained_glass_pane minecraft:blue_stained_glass minecraft:blue_stained_glass_pane minecraft:brown_stained_glass minecraft:brown_stained_glass_pane minecraft:cyan_stained_glass minecraft:cyan_stained_glass_pane minecraft:gray_stained_glass minecraft:gray_stained_glass_pane minecraft:green_stained_glass minecraft:green_stained_glass_pane minecraft:light_blue_stained_glass minecraft:light_blue_stained_glass_pane minecraft:light_gray_stained_glass minecraft:light_gray_stained_glass_pane minecraft:lime_stained_glass minecraft:lime_stained_glass_pane minecraft:magenta_stained_glass minecraft:magenta_stained_glass_pane minecraft:orange_stained_glass minecraft:orange_stained_glass_pane minecraft:pink_stained_glass minecraft:pink_stained_glass_pane minecraft:purple_stained_glass minecraft:purple_stained_glass_pane minecraft:red_stained_glass minecraft:red_stained_glass_pane minecraft:white_stained_glass minecraft:white_stained_glass_pane minecraft:yellow_stained_glass minecraft:yellow_stained_glass_pane minecraft:glass_pane minecraft:glass + block.10002 = minecraft:slime_block minecraft:honey_block ice minecraft:frosted_ice minecraft:black_stained_glass minecraft:black_stained_glass_pane minecraft:blue_stained_glass minecraft:blue_stained_glass_pane minecraft:brown_stained_glass minecraft:brown_stained_glass_pane minecraft:cyan_stained_glass minecraft:cyan_stained_glass_pane minecraft:gray_stained_glass minecraft:gray_stained_glass_pane minecraft:green_stained_glass minecraft:green_stained_glass_pane minecraft:light_blue_stained_glass minecraft:light_blue_stained_glass_pane minecraft:light_gray_stained_glass minecraft:light_gray_stained_glass_pane minecraft:lime_stained_glass minecraft:lime_stained_glass_pane minecraft:magenta_stained_glass minecraft:magenta_stained_glass_pane minecraft:orange_stained_glass minecraft:orange_stained_glass_pane minecraft:pink_stained_glass minecraft:pink_stained_glass_pane minecraft:purple_stained_glass minecraft:purple_stained_glass_pane minecraft:red_stained_glass minecraft:red_stained_glass_pane minecraft:white_stained_glass minecraft:white_stained_glass_pane minecraft:yellow_stained_glass minecraft:yellow_stained_glass_pane minecraft:glass_pane minecraft:glass + + block.1200 = nether_portal ####### ----- misc ----- ####### ## all blocks here get exluded from POM. diff --git a/shaders/lib/blocks.glsl b/shaders/lib/blocks.glsl index 979b0ff..aa00a20 100644 --- a/shaders/lib/blocks.glsl +++ b/shaders/lib/blocks.glsl @@ -1,19 +1,33 @@ #define BLOCK_WATER 8 -#define BLOCK_CAVE_VINE_BERRIES 1000 -#define BLOCK_SOUL_FIRE 1001 -#define BLOCK_SOUL_LANTERN 1002 -#define BLOCK_SOUL_TORCH 1003 - -#define BLOCK_SEA_LANTERN 1009 +#define BLOCK_BEACON 1001 +#define BLOCK_CAVE_VINE_BERRIES 1002 +#define BLOCK_CONDUIT 1003 +#define BLOCK_END_GATEWAY 1004 +#define BLOCK_END_ROD 1005 +#define BLOCK_FIRE 1006 +#define BLOCK_FROGLIGHT_OCHRE 1007 +#define BLOCK_FROGLIGHT_PEARLESCENT 1008 +#define BLOCK_FROGLIGHT_VERDANT 1009 #define BLOCK_GLOWSTONE 1010 -#define BLOCK_TORCH 1011 -#define BLOCK_LAVA 1012 -#define BLOCK_FIRE 1013 -#define BLOCK_REDSTONE_TORCH 1014 +#define BLOCK_JACK_O_LANTERN 1011 +#define BLOCK_LANTERN 1012 +#define BLOCK_LAVA 1013 +#define BLOCK_MAGMA 1014 +#define BLOCK_REDSTONE_LAMP_LIT 1015 +#define BLOCK_REDSTONE_TORCH_LIT 1016 +#define BLOCK_RESPAWN_ANCHOR_4 1017 +#define BLOCK_SCULK_SENSOR_ACTIVE 1018 +#define BLOCK_SEA_PICKLE_WET_1 1019 +#define BLOCK_SEA_PICKLE_WET_2 1020 +#define BLOCK_SEA_PICKLE_WET_3 1021 +#define BLOCK_SEA_PICKLE_WET_4 1022 +#define BLOCK_SEA_LANTERN 1023 +#define BLOCK_SHROOMLIGHT 1024 +#define BLOCK_SMOKER_LIT 1025 +#define BLOCK_SOUL_FIRE 1026 +#define BLOCK_SOUL_LANTERN 1027 +#define BLOCK_SOUL_TORCH 1028 +#define BLOCK_TORCH 1029 -#define BLOCK_MAGMA 1016 - -#define BLOCK_LANTERN 1018 - -#define BLOCK_SHROOMLIGHT 1020 +#define BLOCK_NETHER_PORTAL 1200 diff --git a/shaders/lib/lpv_blocks.glsl b/shaders/lib/lpv_blocks.glsl index dba0484..c6f26d9 100644 --- a/shaders/lib/lpv_blocks.glsl +++ b/shaders/lib/lpv_blocks.glsl @@ -1,5 +1,5 @@ struct LpvBlockData { // 8 x1280 =? - uint MaskWeight; // 4 + uint MaskWeight; // 4 uint ColorRange; // 4 }; @@ -12,6 +12,8 @@ struct LpvBlockData { // 8 x1280 =? LpvBlockData LpvBlockMap[]; }; +const int LpvBlockMapOffset = 999; + uint BuildBlockLpvData(uint mixMask, float mixWeight) { uint data = uint(saturate(mixWeight) * 255.0); diff --git a/shaders/lib/lpv_render.glsl b/shaders/lib/lpv_render.glsl index 56e8815..e085b2c 100644 --- a/shaders/lib/lpv_render.glsl +++ b/shaders/lib/lpv_render.glsl @@ -3,8 +3,7 @@ vec4 SampleLpvNearest(const in ivec3 lpvPos) { ? imageLoad(imgLpv1, lpvPos) : imageLoad(imgLpv2, lpvPos); - //lpvSample.ba = exp2(lpvSample.ba * LpvBlockSkyRange) - 1.0; - lpvSample.b = (lpvSample.b*lpvSample.b) * LpvBlockSkyRange.x; + lpvSample.b = pow(lpvSample.b, 4) * LpvBlockSkyRange.x; lpvSample.rgb = HsvToRgb(lpvSample.rgb); return lpvSample; diff --git a/shaders/world0/setup.csh b/shaders/world0/setup.csh index 92af98b..c6a9b51 100644 --- a/shaders/world0/setup.csh +++ b/shaders/world0/setup.csh @@ -13,10 +13,12 @@ const ivec3 workGroups = ivec3(4, 5, 1); #include "/lib/lpv_blocks.glsl" #endif +const vec3 LightColor_SeaPickle = vec3(0.283, 0.394, 0.212); + void main() { #ifdef IS_LPV_ENABLED - uint blockId = uint(gl_GlobalInvocationID.x + gl_GlobalInvocationID.y * 32); + uint blockId = uint(gl_GlobalInvocationID.x + gl_GlobalInvocationID.y * 32 + LpvBlockMapOffset); //if (blockId >= 1280) return; vec3 lightColor = vec3(0.0); @@ -25,18 +27,108 @@ void main() { uint mixMask = 0xFFFF; switch (blockId) { - case BLOCK_GLOWSTONE: - lightColor = vec3(0.8, 0.7, 0.1); - lightRange = 15.0; - break; - case BLOCK_REDSTONE_TORCH: - lightColor = vec3(1.0, 0.1, 0.1); - lightRange = 7.0; - break; - case BLOCK_SEA_LANTERN: + case BLOCK_BEACON: lightColor = vec3(1.0); lightRange = 15.0; break; + case BLOCK_CAVE_VINE_BERRIES: + lightColor = vec3(0.717, 0.541, 0.188); + lightRange = 14.0; + break; + case BLOCK_CONDUIT: + lightColor = vec3(1.0); + lightRange = 15.0; + break; + case BLOCK_END_GATEWAY: + lightColor = vec3(1.0); + lightRange = 15.0; + break; + case BLOCK_END_ROD: + lightColor = vec3(0.957, 0.929, 0.875); + lightRange = 14.0; + break; + case BLOCK_FIRE: + lightColor = vec3(0.864, 0.598, 0.348); + lightRange = 15.0; + break; + case BLOCK_FROGLIGHT_OCHRE: + lightColor = vec3(0.768, 0.648, 0.108); + lightRange = 15.0; + break; + case BLOCK_FROGLIGHT_PEARLESCENT: + lightColor = vec3(0.737, 0.435, 0.658); + lightRange = 15.0; + break; + case BLOCK_FROGLIGHT_VERDANT: + lightColor = vec3(0.463, 0.763, 0.409); + lightRange = 15.0; + break; + case BLOCK_GLOWSTONE: + lightColor = vec3(0.747, 0.594, 0.326); + lightRange = 15.0; + break; + case BLOCK_JACK_O_LANTERN: + lightColor = vec3(1.0, 0.7, 0.1); + lightRange = 15.0; + break; + case BLOCK_LANTERN: + lightColor = vec3(1.0, 0.7, 0.1); + lightRange = 15.0; + break; + case BLOCK_LAVA: + lightColor = vec3(0.804, 0.424, 0.149); + lightRange = 15.0; + break; + case BLOCK_MAGMA: + lightColor = vec3(0.747, 0.323, 0.110); + lightRange = 3.0; + break; + case BLOCK_REDSTONE_LAMP_LIT: + lightColor = vec3(0.953, 0.796, 0.496); + lightRange = 15.0; + break; + case BLOCK_REDSTONE_TORCH_LIT: + lightColor = vec3(0.939, 0.305, 0.164); + lightRange = 7.0; + break; + case BLOCK_RESPAWN_ANCHOR_4: + lightColor = vec3(1.0, 0.2, 1.0); + lightRange = 15.0; + break; + case BLOCK_SCULK_SENSOR_ACTIVE: + lightColor = vec3(0.1, 0.4, 1.0); + lightRange = 1.0; + break; + case BLOCK_SEA_PICKLE_WET_1: + lightColor = LightColor_SeaPickle; + lightRange = 6.0; + break; + case BLOCK_SEA_PICKLE_WET_2: + lightColor = LightColor_SeaPickle; + lightRange = 9.0; + break; + case BLOCK_SEA_PICKLE_WET_3: + lightColor = LightColor_SeaPickle; + lightRange = 12.0; + break; + case BLOCK_SEA_PICKLE_WET_4: + lightColor = LightColor_SeaPickle; + lightRange = 15.0; + break; + case BLOCK_SEA_LANTERN: + lightColor = vec3(0.553, 0.748, 0.859); + lightRange = 15.0; + break; + case BLOCK_SHROOMLIGHT: + lightColor = vec3(0.848, 0.469, 0.205); + lightRange = 15.0; + break; + case BLOCK_SMOKER_LIT: + lightColor = vec3(0.8, 0.7, 0.1); + lightRange = 13.0; + break; + case BLOCK_SOUL_FIRE: + case BLOCK_SOUL_LANTERN: case BLOCK_SOUL_TORCH: lightColor = vec3(0.1, 0.6, 1.0); lightRange = 10.0; @@ -45,11 +137,17 @@ void main() { lightColor = vec3(1.0, 0.6, 0.1); lightRange = 14.0; break; + + + case BLOCK_NETHER_PORTAL: + lightColor = vec3(0.502, 0.165, 0.831); + lightRange = 11.0; + break; } LpvBlockData block; - block.MaskWeight = BuildBlockLpvData(mixMask, mixWeight); block.ColorRange = packUnorm4x8(vec4(lightColor, lightRange/255.0)); - LpvBlockMap[blockId] = block; + block.MaskWeight = BuildBlockLpvData(mixMask, mixWeight); + LpvBlockMap[blockId - LpvBlockMapOffset] = block; #endif } diff --git a/shaders/world0/shadowcomp.csh b/shaders/world0/shadowcomp.csh index 3c359bb..8100506 100644 --- a/shaders/world0/shadowcomp.csh +++ b/shaders/world0/shadowcomp.csh @@ -34,8 +34,6 @@ layout (local_size_x = 8, local_size_y = 8, local_size_z = 8) in; #include "/lib/voxel_common.glsl" #include "/lib/voxel_read.glsl" - // uniform mat4 gbufferModelViewInverse; - int sumOf(ivec3 vec) {return vec.x + vec.y + vec.z;} vec3 RGBToLinear(const in vec3 color) { @@ -77,7 +75,7 @@ layout (local_size_x = 8, local_size_y = 8, local_size_z = 8) in; uint blockId = voxelSharedData[shared_index]; if (blockId > 0 && blockId != BLOCK_EMPTY) - ParseBlockLpvData(LpvBlockMap[blockId].MaskWeight, mixMask, mixWeight); + ParseBlockLpvData(LpvBlockMap[blockId - LpvBlockMapOffset].MaskWeight, mixMask, mixWeight); return lpvSharedData[shared_index] * ((mixMask >> mask_index) & 1u);// * mixWeight; } @@ -141,7 +139,7 @@ void main() { float mixWeight = blockId == BLOCK_EMPTY ? 1.0 : 0.0; if (blockId > 0 && blockId != BLOCK_EMPTY) - ParseBlockLpvData(LpvBlockMap[blockId].MaskWeight, mixMask, mixWeight); + ParseBlockLpvData(LpvBlockMap[blockId - LpvBlockMapOffset].MaskWeight, mixMask, mixWeight); #ifdef LPV_GLASS_TINT if (blockId >= BLOCK_HONEY && blockId <= BLOCK_TINTED_GLASS) { @@ -160,16 +158,11 @@ void main() { lightValue.ba = log2(lightValue.ba + 1.0) / LpvBlockSkyRange; if (blockId > 0 && blockId != BLOCK_EMPTY) { - vec4 lightColorRange = unpackUnorm4x8(LpvBlockMap[blockId].ColorRange); - vec3 lightColor = RGBToLinear(lightColorRange.rgb); + vec4 lightColorRange = unpackUnorm4x8(LpvBlockMap[blockId - LpvBlockMapOffset].ColorRange); float lightRange = lightColorRange.a * 255.0; - // #ifdef LIGHTING_FLICKER - // vec2 lightNoise = GetDynLightNoise(cameraPosition + blockLocalPos); - // ApplyLightFlicker(lightColor, lightType, lightNoise); - // #endif - if (lightRange > EPSILON) { + vec3 lightColor = RGBToLinear(lightColorRange.rgb); lightValue.rgb = Lpv_RgbToHsv(lightColor, lightRange); } }