diff --git a/shaders/block.properties b/shaders/block.properties index 5e53815d..2e8caf70 100644 --- a/shaders/block.properties +++ b/shaders/block.properties @@ -86,19 +86,18 @@ block.324=lectern block.325=lever block.326=lightning_rod:powered=false block.327=piston_head -block.328=acacia_pressure_plate birch_pressure_plate crimson_pressure_plate dark_oak_pressure_plate heavy_weighted_pressure_plate jungle_pressure_plate light_weighted_pressure_plate mangrove_pressure_plate oak_pressure_plate polished_blackstone_pressure_plate stone_pressure_plate warped_pressure_plate -block.329=pointed_dripstone -block.330=potted_acacia_sapling potted_allium potted_azalea_bush potted_bamboo potted_azure_bluet potted_birch_sapling potted_blue_orchid potted_brown_mushroom potted_cactus potted_cornflower potted_crimson_fungus potted_crimson_roots potted_dandelion potted_dark_oak_sapling potted_dead_bush potted_fern potted_flowering_azalea_bush potted_jungle_sapling potted_lily_of_the_valley potted_mangrove_propagule potted_oak_sapling potted_orange_tulip potted_oxeye_daisy potted_pink_tulip potted_poppy potted_red_mushroom potted_red_tulip potted_spruce_sapling potted_warped_fungus potted_warped_roots potted_white_tulip potted_wither_rose -block.331=rail activator_rail detector_rail -block.332=redstone_wire -block.333=repeater -block.334=scaffolding -block.335=snow -block.336=black_stained_glass_pane blue_stained_glass_pane brown_stained_glass_pane cyan_stained_glass_pane gray_stained_glass_pane green_stained_glass_pane light_blue_stained_glass_pane light_gray_stained_glass_pane lime_stained_glass_pane magenta_stained_glass_pane orange_stained_glass_pane pink_stained_glass_pane purple_stained_glass_pane red_stained_glass_pane white_stained_glass_pane yellow_stained_glass_pane -block.337=melon_stem attached_melon_stem pumpkin_stem attached_pumpkin_stem -block.338=stonecutter -block.339=acacia_trapdoor birch_trapdoor crimson_trapdoor dark_oak_trapdoor iron_trapdoor jungle_trapdoor mangrove_trapdoor oak_trapdoor spruce_trapdoor warped_trapdoor -block.340=tripwire_hook +block.328=pointed_dripstone +block.329=potted_acacia_sapling potted_allium potted_azalea_bush potted_bamboo potted_azure_bluet potted_birch_sapling potted_blue_orchid potted_brown_mushroom potted_cactus potted_cornflower potted_crimson_fungus potted_crimson_roots potted_dandelion potted_dark_oak_sapling potted_dead_bush potted_fern potted_flowering_azalea_bush potted_jungle_sapling potted_lily_of_the_valley potted_mangrove_propagule potted_oak_sapling potted_orange_tulip potted_oxeye_daisy potted_pink_tulip potted_poppy potted_red_mushroom potted_red_tulip potted_spruce_sapling potted_warped_fungus potted_warped_roots potted_white_tulip potted_wither_rose +block.330=rail activator_rail detector_rail +block.331=redstone_wire +block.332=repeater +block.333=scaffolding +block.334=snow +block.335=black_stained_glass_pane blue_stained_glass_pane brown_stained_glass_pane cyan_stained_glass_pane gray_stained_glass_pane green_stained_glass_pane light_blue_stained_glass_pane light_gray_stained_glass_pane lime_stained_glass_pane magenta_stained_glass_pane orange_stained_glass_pane pink_stained_glass_pane purple_stained_glass_pane red_stained_glass_pane white_stained_glass_pane yellow_stained_glass_pane +block.336=melon_stem attached_melon_stem pumpkin_stem attached_pumpkin_stem +block.337=stonecutter +block.338=acacia_trapdoor birch_trapdoor crimson_trapdoor dark_oak_trapdoor iron_trapdoor jungle_trapdoor mangrove_trapdoor oak_trapdoor spruce_trapdoor warped_trapdoor +block.339=tripwire_hook block.400=amethyst_cluster block.401=beacon block.402=blast_furnace:lit=true @@ -176,3 +175,9 @@ block.541=acacia_fence:north=true bamboo_fence:north=true birch_fence:north=true block.542=acacia_fence:east=true bamboo_fence:east=true birch_fence:east=true crimson_fence:east=true dark_oak_fence:east=true jungle_fence:east=true mangrove_fence:east=true nether_brick_fence:east=true oak_fence:east=true spruce_fence:east=true warped_fence:east=true block.543=acacia_fence:south=true bamboo_fence:south=true birch_fence:south=true crimson_fence:south=true dark_oak_fence:south=true jungle_fence:south=true mangrove_fence:south=true nether_brick_fence:south=true oak_fence:south=true spruce_fence:south=true warped_fence:south=true block.544=acacia_fence:west=true bamboo_fence:west=true birch_fence:west=true crimson_fence:west=true dark_oak_fence:west=true jungle_fence:west=true mangrove_fence:west=true nether_brick_fence:west=true oak_fence:west=true spruce_fence:west=true warped_fence:west=true +block.560=acacia_pressure_plate birch_pressure_plate crimson_pressure_plate dark_oak_pressure_plate heavy_weighted_pressure_plate jungle_pressure_plate light_weighted_pressure_plate mangrove_pressure_plate oak_pressure_plate polished_blackstone_pressure_plate stone_pressure_plate warped_pressure_plate +block.561=cobblestone_wall:north=none:east=none:south=none:west=none +block.562=cobblestone_wall:north=low:east=none:south=none:west=none +block.563=cobblestone_wall:north=none:east=low:south=none:west=none +block.564=cobblestone_wall:north=none:east=none:south=low:west=none +block.565=cobblestone_wall:north=none:east=none:south=none:west=low diff --git a/shaders/block.template.properties b/shaders/block.template.properties index b1222d65..d68d34e2 100644 --- a/shaders/block.template.properties +++ b/shaders/block.template.properties @@ -291,11 +291,6 @@ block.*=lightning_rod:powered=false # BLOCK_PISTON_HEAD block.*=piston_head -# BLOCK_PRESSURE_PLATE -block.*=acacia_pressure_plate birch_pressure_plate crimson_pressure_plate dark_oak_pressure_plate \ - heavy_weighted_pressure_plate jungle_pressure_plate light_weighted_pressure_plate mangrove_pressure_plate \ - oak_pressure_plate polished_blackstone_pressure_plate stone_pressure_plate warped_pressure_plate - # BLOCK_POINTED_DRIPSTONE block.*=pointed_dripstone @@ -1620,4 +1615,24 @@ block.544=acacia_fence:west=true bamboo_fence:west=true birch_fence:west=true cr # jungle_fence:west=true:east=true mangrove_fence:west=true:east=true nether_brick_fence:west=true:east=true oak_fence:west=true:east=true spruce_fence:west=true:east=true \ # warped_fence:west=true:east=true -# TODO: all other fence combinations \ No newline at end of file +# TODO: all other fence combinations + +# BLOCK_PRESSURE_PLATE +block.560=acacia_pressure_plate birch_pressure_plate crimson_pressure_plate dark_oak_pressure_plate \ + heavy_weighted_pressure_plate jungle_pressure_plate light_weighted_pressure_plate mangrove_pressure_plate \ + oak_pressure_plate polished_blackstone_pressure_plate stone_pressure_plate warped_pressure_plate + +# BLOCK_WALL_POST +block.561=cobblestone_wall:north=none:east=none:south=none:west=none + +# BLOCK_WALL_N_LOW +block.562=cobblestone_wall:north=low:east=none:south=none:west=none + +# BLOCK_WALL_E_LOW +block.563=cobblestone_wall:north=none:east=low:south=none:west=none + +# BLOCK_WALL_S_LOW +block.564=cobblestone_wall:north=none:east=none:south=low:west=none + +# BLOCK_WALL_W_LOW +block.565=cobblestone_wall:north=none:east=none:south=none:west=low diff --git a/shaders/lib/blocks.glsl b/shaders/lib/blocks.glsl index 62c5dce8..746ab2a0 100644 --- a/shaders/lib/blocks.glsl +++ b/shaders/lib/blocks.glsl @@ -86,19 +86,18 @@ #define BLOCK_LEVER 325 #define BLOCK_LIGHTNING_ROD 326 #define BLOCK_PISTON_HEAD 327 -#define BLOCK_PRESSURE_PLATE 328 -#define BLOCK_POINTED_DRIPSTONE 329 -#define BLOCK_POTTED_PLANT 330 -#define BLOCK_RAIL 331 -#define BLOCK_REDSTONE_WIRE 332 -#define BLOCK_REPEATER 333 -#define BLOCK_SCAFFOLDING 334 -#define BLOCK_SNOW 335 -#define BLOCK_STAINED_GLASS_PANE 336 -#define BLOCK_STEM 337 -#define BLOCK_STONECUTTER 338 -#define BLOCK_TRAPDOOR 339 -#define BLOCK_TRIPWIRE_HOOK 340 +#define BLOCK_POINTED_DRIPSTONE 328 +#define BLOCK_POTTED_PLANT 329 +#define BLOCK_RAIL 330 +#define BLOCK_REDSTONE_WIRE 331 +#define BLOCK_REPEATER 332 +#define BLOCK_SCAFFOLDING 333 +#define BLOCK_SNOW 334 +#define BLOCK_STAINED_GLASS_PANE 335 +#define BLOCK_STEM 336 +#define BLOCK_STONECUTTER 337 +#define BLOCK_TRAPDOOR 338 +#define BLOCK_TRIPWIRE_HOOK 339 #define BLOCK_AMETHYST_CLUSTER 400 #define BLOCK_BEACON 401 #define BLOCK_BLAST_FURNACE_LIT 402 @@ -176,3 +175,9 @@ #define BLOCK_FENCE_E 542 #define BLOCK_FENCE_S 543 #define BLOCK_FENCE_W 544 +#define BLOCK_PRESSURE_PLATE 560 +#define BLOCK_WALL_POST 561 +#define BLOCK_WALL_N_LOW 562 +#define BLOCK_WALL_E_LOW 563 +#define BLOCK_WALL_S_LOW 564 +#define BLOCK_WALL_W_LOW 565 diff --git a/shaders/lib/common.glsl b/shaders/lib/common.glsl index cd081c4a..1e436c02 100644 --- a/shaders/lib/common.glsl +++ b/shaders/lib/common.glsl @@ -58,7 +58,7 @@ const bool colortex2Clear = true; // Dynamic Lighting #define DYN_LIGHT_MODE 1 // [0 1 2] -#define DYN_LIGHT_BRIGHTNESS 100 // [20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400] +#define DYN_LIGHT_BRIGHTNESS 200 // [20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400] #define DYN_LIGHT_DIRECTIONAL #define DYN_LIGHT_FLICKER //#define LIGHT_LAVA_ENABLED @@ -79,7 +79,7 @@ const bool colortex2Clear = true; // Post-Processing #define TONEMAP_ENABLED -#define TONEMAP_CONTRAST 0.02 // [0.0 0.01 0.02 0.03 0.04] +#define TONEMAP_CONTRAST 0.02 // [-0.02 -0.01 0.00 0.01 0.02 0.03 0.04] #define FXAA_ENABLED #define AF_SAMPLES 1 diff --git a/shaders/lib/constants.glsl b/shaders/lib/constants.glsl index 8501c2b0..83245b58 100644 --- a/shaders/lib/constants.glsl +++ b/shaders/lib/constants.glsl @@ -45,5 +45,11 @@ #define BLOCKTYPE_STAIRS_TOP_OUTER_S_W 27u #define BLOCKTYPE_STAIRS_TOP_OUTER_S_E 28u #define BLOCKTYPE_FENCE_POST 29u +#define BLOCKTYPE_FENCE_N 30u +#define BLOCKTYPE_FENCE_E 31u +#define BLOCKTYPE_FENCE_S 32u +#define BLOCKTYPE_FENCE_W 33u +#define BLOCKTYPE_PRESSURE_PLATE 40u +#define BLOCKTYPE_WALL_POST 41u #define TEX_LIGHT_NOISE noisetex diff --git a/shaders/lib/lighting/basic.glsl b/shaders/lib/lighting/basic.glsl index 59616bfe..1711b2b9 100644 --- a/shaders/lib/lighting/basic.glsl +++ b/shaders/lib/lighting/basic.glsl @@ -72,6 +72,14 @@ float SampleLight(const in vec3 fragLocalPos, const in vec3 fragLocalNormal, con boundsMin = vec3(0.375, 0.0, 0.375); boundsMax = vec3(0.625, 1.0, 0.625); break; + case BLOCKTYPE_PRESSURE_PLATE: + boundsMin = vec3((1.0/16.0), 0.0, (1.0/16.0)); + boundsMax = vec3((15.0/16.0), (1.0/16.0), (15.0/16.0)); + break; + case BLOCKTYPE_WALL_POST: + boundsMin = vec3(0.25, 0.0, 0.25); + boundsMax = vec3(0.75, 1.0, 0.75); + break; } bool hit = all(greaterThanEqual(blockPos, boundsMin)) && all(lessThanEqual(blockPos, boundsMax)); @@ -271,8 +279,9 @@ float SampleLight(const in vec3 fragLocalPos, const in vec3 fragLocalNormal, con #endif #if defined RENDER_TERRAIN || defined RENDER_WATER - vec2 lightNoiseSample = GetDynLightNoise(localPos); - vec3 accumDiffuse = GetSceneBlockLightColor(blockId, lightNoiseSample); + //vec2 lightNoiseSample = GetDynLightNoise(localPos); + //vec3 accumDiffuse = GetSceneBlockLightColor(blockId, lightNoiseSample); + vec3 accumDiffuse = vec3(GetSceneBlockLightLevel(blockId) / 16.0); #else vec3 accumDiffuse = vec3(0.0); #endif diff --git a/shaders/lib/lighting/dynamic_blocks.glsl b/shaders/lib/lighting/dynamic_blocks.glsl index 48ab062b..a91910f0 100644 --- a/shaders/lib/lighting/dynamic_blocks.glsl +++ b/shaders/lib/lighting/dynamic_blocks.glsl @@ -186,42 +186,19 @@ vec3 GetSceneBlockLightColor(const in int blockId, const in vec2 noiseSample) { return lightColor; } -void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { - #ifdef DYN_LIGHT_FLICKER - vec2 noiseSample = GetDynLightNoise(blockLocalPos); - vec3 lightColor = GetSceneBlockLightColor(blockId, noiseSample); - #endif - - vec3 lightOffset = vec3(0.0); +float GetSceneBlockLightLevel(const in int blockId) { float lightRange = 0.0; - float flicker = 0.0; - //float pulse = 0.0; - float glow = 0.0; - - #ifdef DYN_LIGHT_FLICKER - float time = frameTimeCounter / 3600.0; - // vec3 worldPos = cameraPosition + blockLocalPos; - - // vec3 texPos = fract(worldPos.xzy * vec3(0.04, 0.04, 0.08)); - // texPos.z += 200.0 * time; - - // vec2 noiseSample = texture(TEX_LIGHT_NOISE, vec2(0.3, 0.6)*texPos.y + texPos.xz).rg; - float flickerNoise = GetDynLightFlickerNoise(noiseSample); - #endif - switch (blockId) { case BLOCK_AMETHYST_CLUSTER: case ITEM_AMETHYST_CLUSTER: lightRange = 5.0; - glow = 0.2; break; case BLOCK_BEACON: case ITEM_BEACON: lightRange = 15.0; break; case BLOCK_BLAST_FURNACE_LIT: - lightOffset = vec3(0.0, -0.4, 0.0); lightRange = 6.0; break; case BLOCK_BREWING_STAND: @@ -229,24 +206,18 @@ void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { break; case BLOCK_CANDLES_LIT_1: lightRange = 3.0; - flicker = 0.14; break; case BLOCK_CANDLES_LIT_2: lightRange = 6.0; - flicker = 0.14; break; case BLOCK_CANDLES_LIT_3: lightRange = 9.0; - flicker = 0.14; break; case BLOCK_CANDLES_LIT_4: lightRange = 12.0; - flicker = 0.14; break; case BLOCK_CANDLE_CAKE_LIT: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 3.0; - flicker = 0.14; break; case BLOCK_CAVEVINE_BERRIES: case ITEM_GLOW_BERRIES: @@ -255,82 +226,66 @@ void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { case BLOCK_CRYING_OBSIDIAN: case ITEM_CRYING_OBSIDIAN: lightRange = 10.0; - glow = 0.3; break; case BLOCK_END_ROD: case ITEM_END_ROD: lightRange = 14.0; break; case BLOCK_FIRE: - lightOffset = vec3(0.0, -0.3, 0.0); lightRange = 15.0; - flicker = 0.5; break; case BLOCK_FURNACE_LIT: - lightOffset = vec3(0.0, -0.2, 0.0); lightRange = 6.0; break; case BLOCK_GLOWSTONE: case ITEM_GLOWSTONE: lightRange = 15.0; - glow = 0.4; break; case BLOCK_GLOW_LICHEN: case ITEM_GLOW_LICHEN: lightRange = 7.0; - glow = 0.2; break; case BLOCK_JACK_O_LANTERN: case ITEM_JACK_O_LANTERN: lightRange = 15.0; - flicker = 0.3; break; case BLOCK_LANTERN: case ITEM_LANTERN: - lightOffset = vec3(0.0, -0.25, 0.0); lightRange = 12.0; - flicker = 0.05; break; case BLOCK_LIGHTING_ROD_POWERED: lightRange = 8.0; - flicker = 0.8; break; case BLOCK_AMETHYST_BUD_LARGE: case ITEM_AMETHYST_BUD_LARGE: lightRange = 4.0; - glow = 0.2; break; case BLOCK_LAVA: - #ifndef LIGHT_LAVA_ENABLED - return; + #ifdef LIGHT_LAVA_ENABLED + lightRange = 15.0; #endif + break; case BLOCK_LAVA_CAULDRON: lightRange = 15.0; - glow = 0.4; break; case BLOCK_MAGMA: case ITEM_MAGMA: lightRange = 3.0; - glow = 0.2; break; case BLOCK_AMETHYST_BUD_MEDIUM: case ITEM_AMETHYST_BUD_MEDIUM: lightRange = 2.0; - glow = 0.2; break; case BLOCK_NETHER_PORTAL: lightRange = 11.0; - glow = 0.8; break; case BLOCK_FROGLIGHT_OCHRE: case ITEM_FROGLIGHT_OCHRE: lightRange = 15.0; - glow = 0.2; break; case BLOCK_FROGLIGHT_PEARLESCENT: case ITEM_FROGLIGHT_PEARLESCENT: lightRange = 15.0; - glow = 0.2; break; case BLOCK_REDSTONE_LAMP: lightRange = 15.0; @@ -340,86 +295,256 @@ void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { lightRange = 7.0; break; case BLOCK_RESPAWN_ANCHOR_4: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 15.0; - glow = 0.6; break; case BLOCK_RESPAWN_ANCHOR_3: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 11.0; - glow = 0.6; break; case BLOCK_RESPAWN_ANCHOR_2: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 7.0; - glow = 0.6; break; case BLOCK_RESPAWN_ANCHOR_1: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 3.0; - glow = 0.6; break; case BLOCK_SCULK_CATALYST: case ITEM_SCULK_CATALYST: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 6.0; break; case BLOCK_SEA_LANTERN: case ITEM_SEA_LANTERN: lightRange = 15.0; - glow = 0.4; break; case BLOCK_SEA_PICKLE_WET_1: lightRange = 6.0; - glow = 0.4; break; case BLOCK_SEA_PICKLE_WET_2: lightRange = 9.0; - glow = 0.4; break; case BLOCK_SEA_PICKLE_WET_3: lightRange = 12.0; - glow = 0.4; break; case BLOCK_SEA_PICKLE_WET_4: lightRange = 15.0; - glow = 0.4; break; case BLOCK_SHROOMLIGHT: case ITEM_SHROOMLIGHT: lightRange = 15.0; - glow = 0.6; break; case BLOCK_SMOKER_LIT: - lightOffset = vec3(0.0, -0.3, 0.0); lightRange = 6.0; break; case BLOCK_SOUL_LANTERN: case ITEM_SOUL_LANTERN: - lightOffset = vec3(0.0, -0.25, 0.0); lightRange = 12.0; - flicker = 0.1; break; case BLOCK_SOUL_TORCH: case ITEM_SOUL_TORCH: lightRange = 12.0; - flicker = 0.1; break; case BLOCK_TORCH: case ITEM_TORCH: - lightOffset = vec3(0.0, 0.4, 0.0); lightRange = 12.0; - flicker = 0.4; break; case BLOCK_FROGLIGHT_VERDANT: case ITEM_FROGLIGHT_VERDANT: lightRange = 15.0; - glow = 0.2; break; } + return lightRange; +} + +void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { + float lightRange = GetSceneBlockLightLevel(blockId); + bool intersects = true; if (lightRange > EPSILON) { + vec2 noiseSample = vec2(0.0); + #ifdef DYN_LIGHT_FLICKER + noiseSample = GetDynLightNoise(blockLocalPos); + #endif + + vec3 lightColor = GetSceneBlockLightColor(blockId, noiseSample); + vec3 lightOffset = vec3(0.0); + float flicker = 0.0; + //float pulse = 0.0; + float glow = 0.0; + + #ifdef DYN_LIGHT_FLICKER + float time = frameTimeCounter / 3600.0; + // vec3 worldPos = cameraPosition + blockLocalPos; + + // vec3 texPos = fract(worldPos.xzy * vec3(0.04, 0.04, 0.08)); + // texPos.z += 200.0 * time; + + // vec2 noiseSample = texture(TEX_LIGHT_NOISE, vec2(0.3, 0.6)*texPos.y + texPos.xz).rg; + float flickerNoise = GetDynLightFlickerNoise(noiseSample); + #endif + + switch (blockId) { + case BLOCK_AMETHYST_CLUSTER: + case ITEM_AMETHYST_CLUSTER: + glow = 0.2; + break; + case BLOCK_BEACON: + case ITEM_BEACON: + break; + case BLOCK_BLAST_FURNACE_LIT: + lightOffset = vec3(0.0, -0.4, 0.0); + break; + case BLOCK_BREWING_STAND: + break; + case BLOCK_CANDLES_LIT_1: + flicker = 0.14; + break; + case BLOCK_CANDLES_LIT_2: + flicker = 0.14; + break; + case BLOCK_CANDLES_LIT_3: + flicker = 0.14; + break; + case BLOCK_CANDLES_LIT_4: + flicker = 0.14; + break; + case BLOCK_CANDLE_CAKE_LIT: + lightOffset = vec3(0.0, 0.4, 0.0); + flicker = 0.14; + break; + case BLOCK_CAVEVINE_BERRIES: + case ITEM_GLOW_BERRIES: + break; + case BLOCK_CRYING_OBSIDIAN: + case ITEM_CRYING_OBSIDIAN: + glow = 0.3; + break; + case BLOCK_END_ROD: + case ITEM_END_ROD: + break; + case BLOCK_FIRE: + lightOffset = vec3(0.0, -0.3, 0.0); + flicker = 0.5; + break; + case BLOCK_FURNACE_LIT: + lightOffset = vec3(0.0, -0.2, 0.0); + break; + case BLOCK_GLOWSTONE: + case ITEM_GLOWSTONE: + glow = 0.4; + break; + case BLOCK_GLOW_LICHEN: + case ITEM_GLOW_LICHEN: + glow = 0.2; + break; + case BLOCK_JACK_O_LANTERN: + case ITEM_JACK_O_LANTERN: + flicker = 0.3; + break; + case BLOCK_LANTERN: + case ITEM_LANTERN: + lightOffset = vec3(0.0, -0.25, 0.0); + flicker = 0.05; + break; + case BLOCK_LIGHTING_ROD_POWERED: + flicker = 0.8; + break; + case BLOCK_AMETHYST_BUD_LARGE: + case ITEM_AMETHYST_BUD_LARGE: + glow = 0.2; + break; + case BLOCK_LAVA: + #ifndef LIGHT_LAVA_ENABLED + return; + #endif + case BLOCK_LAVA_CAULDRON: + glow = 0.4; + break; + case BLOCK_MAGMA: + case ITEM_MAGMA: + glow = 0.2; + break; + case BLOCK_AMETHYST_BUD_MEDIUM: + case ITEM_AMETHYST_BUD_MEDIUM: + glow = 0.2; + break; + case BLOCK_NETHER_PORTAL: + glow = 0.8; + break; + case BLOCK_FROGLIGHT_OCHRE: + case ITEM_FROGLIGHT_OCHRE: + glow = 0.2; + break; + case BLOCK_FROGLIGHT_PEARLESCENT: + case ITEM_FROGLIGHT_PEARLESCENT: + glow = 0.2; + break; + case BLOCK_REDSTONE_LAMP: + break; + case BLOCK_REDSTONE_TORCH: + case ITEM_REDSTONE_TORCH: + break; + case BLOCK_RESPAWN_ANCHOR_4: + lightOffset = vec3(0.0, 0.4, 0.0); + glow = 0.6; + break; + case BLOCK_RESPAWN_ANCHOR_3: + lightOffset = vec3(0.0, 0.4, 0.0); + glow = 0.6; + break; + case BLOCK_RESPAWN_ANCHOR_2: + lightOffset = vec3(0.0, 0.4, 0.0); + glow = 0.6; + break; + case BLOCK_RESPAWN_ANCHOR_1: + lightOffset = vec3(0.0, 0.4, 0.0); + glow = 0.6; + break; + case BLOCK_SCULK_CATALYST: + case ITEM_SCULK_CATALYST: + lightOffset = vec3(0.0, 0.4, 0.0); + break; + case BLOCK_SEA_LANTERN: + case ITEM_SEA_LANTERN: + glow = 0.4; + break; + case BLOCK_SEA_PICKLE_WET_1: + glow = 0.4; + break; + case BLOCK_SEA_PICKLE_WET_2: + glow = 0.4; + break; + case BLOCK_SEA_PICKLE_WET_3: + glow = 0.4; + break; + case BLOCK_SEA_PICKLE_WET_4: + glow = 0.4; + break; + case BLOCK_SHROOMLIGHT: + case ITEM_SHROOMLIGHT: + glow = 0.6; + break; + case BLOCK_SMOKER_LIT: + lightOffset = vec3(0.0, -0.3, 0.0); + break; + case BLOCK_SOUL_LANTERN: + case ITEM_SOUL_LANTERN: + lightOffset = vec3(0.0, -0.25, 0.0); + flicker = 0.1; + break; + case BLOCK_SOUL_TORCH: + case ITEM_SOUL_TORCH: + flicker = 0.1; + break; + case BLOCK_TORCH: + case ITEM_TORCH: + lightOffset = vec3(0.0, 0.4, 0.0); + flicker = 0.4; + break; + case BLOCK_FROGLIGHT_VERDANT: + case ITEM_FROGLIGHT_VERDANT: + glow = 0.2; + break; + } + #ifdef DYN_LIGHT_FRUSTUM_TEST vec3 lightViewPos = (gbufferModelView * vec4(blockLocalPos, 1.0)).xyz; @@ -558,6 +683,16 @@ void AddSceneBlockLight(const in int blockId, const in vec3 blockLocalPos) { //case BLOCK_FENCE_W_E: blockType = BLOCKTYPE_FENCE_POST; break; + case BLOCK_PRESSURE_PLATE: + blockType = BLOCKTYPE_PRESSURE_PLATE; + break; + case BLOCK_WALL_POST: + case BLOCK_WALL_N_LOW: + case BLOCK_WALL_E_LOW: + case BLOCK_WALL_S_LOW: + case BLOCK_WALL_W_LOW: + blockType = BLOCKTYPE_WALL_POST; + break; } uint gridIndex = GetSceneLightGridIndex(gridCell);