Skip to content

Commit

Permalink
pt wall posts
Browse files Browse the repository at this point in the history
  • Loading branch information
null511 committed Mar 6, 2023
1 parent d2f7585 commit f5f489f
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 107 deletions.
31 changes: 18 additions & 13 deletions shaders/block.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
27 changes: 21 additions & 6 deletions shaders/block.template.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
# 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
31 changes: 18 additions & 13 deletions shaders/lib/blocks.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions shaders/lib/common.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
6 changes: 6 additions & 0 deletions shaders/lib/constants.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 11 additions & 2 deletions shaders/lib/lighting/basic.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit f5f489f

Please sign in to comment.