mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 09:38:52 +08:00
Balance cloud lighting. remake altocumulus shapes. Add daily weather profiles. Add rainy weather. clean vl fog code and fix atmospheric haze contribution to bloomy fog. add motion blur. add new composite pass dedicated to post processing effects (damage effects, motion blur, whatever). fix waving for tall plants. fix broken lighting when HQ ambient light is enabled. improve screenspace SSS on DH chunks. add more DH settings. add "large waves" setting for water. make moonlight slightly darker. improve cave fog. remade cave detection. fix upscaling scaling issues
This commit is contained in:
parent
9a66781d0f
commit
a7ab9f971f
@ -6,43 +6,52 @@ block.11=bamboo bamboo_sapling
|
||||
|
||||
block.12=minecraft:short_grass minecraft:grass
|
||||
|
||||
block.13=minecraft:tall_grass:half=lower
|
||||
block.13=minecraft:small_dripleaf:half=lower minecraft:pitcher_plant:half=lower minecraft:tall_grass:half=lower minecraft:sunflower:half=lower minecraft:large_fern:half=lower minecraft:peony:half=lower minecraft:rose_bush:half=lower minecraft:lilac:half=lower minecraft:tall_seagrass:half=lower \
|
||||
\ conquest:large_fern_1:half=lower conquest:large_fern_2:half=lower conquest:large_fern_3:half=lower conquest:thick_fern:half=lower conquest:tall_grass:half=lower conquest:large_fern:half=lower conquest:sunflower:half=lower conquest:tall_lilac:half=lower conquest:peony:half=lower conquest:rose_bush:half=lower conquest:tall_seagrass:half=lower
|
||||
|
||||
block.14=minecraft:tall_grass:half=upper
|
||||
block.14=minecraft:small_dripleaf:half=upper minecraft:pitcher_plant:half=upper minecraft:tall_grass:half=upper minecraft:sunflower:half=upper minecraft:large_fern:half=upper minecraft:peony:half=upper minecraft:rose_bush:half=upper minecraft:lilac:half=upper minecraft:tall_seagrass:half=upper \
|
||||
\ conquest:large_fern_1:half=upper conquest:large_fern_2:half=upper conquest:large_fern_3:half=upper conquest:thick_fern:half=upper conquest:tall_grass:half=upper conquest:large_fern:half=upper conquest:sunflower:half=upper conquest:tall_lilac:half=upper conquest:peony:half=upper conquest:rose_bush:half=upper conquest:tall_seagrass:half=upper
|
||||
|
||||
block.15=minecraft:oak_sapling minecraft:spruce_sapling minecraft:birch_sapling minecraft:jungle_sapling minecraft:acacia_sapling minecraft:dark_oak_sapling
|
||||
block.15=minecraft:oak_sapling minecraft:spruce_sapling minecraft:birch_sapling minecraft:jungle_sapling minecraft:acacia_sapling minecraft:dark_oak_sapling minecraft:cherry_sapling
|
||||
|
||||
block.16=vine
|
||||
|
||||
block.17=minecraft:hanging_roots minecraft:weeping_vines minecraft:cave_vines:berries=false
|
||||
|
||||
|
||||
####### ----- waving blocks with SSS ----- #######
|
||||
|
||||
## ground waving
|
||||
## add a newline to organize for modded blocks
|
||||
block.60=minecraft:sunflower:half=upper minecraft:beetroots minecraft:potatoes minecraft:carrots minecraft:wheat minecraft:nether_wart minecraft:kelp minecraft:large_fern:half=upper minecraft:peony:half=upper minecraft:rose_bush:half=upper minecraft:lilac:half=upper minecraft:crimson_roots minecraft:nether_sprouts minecraft:warped_roots minecraft:seagrass minecraft:tall_seagrass:half=upper minecraft:wither_rose minecraft:lily_of_the_valley minecraft:cornflower minecraft:sweet_berry_bush minecraft:oxeye_daisy minecraft:pink_tulip minecraft:white_tulip minecraft:orange_tulip minecraft:red_tulip minecraft:azure_bluet minecraft:allium minecraft:blue_orchid minecraft:poppy minecraft:dandelion minecraft:dead_bush
|
||||
# removed: sapling(s)
|
||||
block.60 = minecraft:melon_stem minecraft:pumpkin_stem minecraft:flowering_azalea minecraft:azalea minecraft:big_dripleaf minecraft:torchflower minecraft:torchflower_crop minecraft:pitcher_crop:half=upper minecraft:warped_fungus minecraft:twisting_vines minecraft:pink_petals minecraft:kelp minecraft:beetroots minecraft:potatoes minecraft:carrots minecraft:wheat minecraft:nether_wart minecraft:crimson_roots minecraft:nether_sprouts minecraft:warped_roots minecraft:seagrass minecraft:wither_rose minecraft:lily_of_the_valley minecraft:cornflower minecraft:sweet_berry_bush minecraft:oxeye_daisy minecraft:pink_tulip minecraft:white_tulip minecraft:orange_tulip minecraft:red_tulip minecraft:azure_bluet minecraft:allium minecraft:blue_orchid minecraft:poppy minecraft:dandelion minecraft:dead_bush
|
||||
|
||||
## ground waving vertical models. this exists to brighten up the sides of grass and stuff in shaded places they blend in better with the world.
|
||||
block.61=minecraft:fern conquest:acacia_sapling conquest:alder_tree_sapling conquest:apple_tree_sapling conquest:aspen_tree_sapling conquest:birch_sapling conquest:cherry_tree_sapling conquest:dark_oak_sapling conquest:downy_willow_tree_sapling conquest:gorse_tree_sapling conquest:grape_vine_sapling conquest:horse_chestnut_tree_sapling conquest:jungle_sapling conquest:larch_tree_sapling conquest:mallorn_tree_sapling conquest:oak_sapling conquest:orange_tree_sapling conquest:pear_tree_sapling conquest:pine_tree_sapling conquest:plum_tree_sapling conquest:rowan_tree_sapling conquest:spruce_sapling conquest:willow_tree_sapling conquest:angelica conquest:black_knapweed conquest:buttercups conquest:cornflower conquest:dandelion conquest:elanor conquest:goldenrod conquest:harebell conquest:lily_of_the_valley conquest:lobelia_flowers conquest:marsh_ragwort conquest:meadow_saffron conquest:mediterranean_wild_tulip conquest:moorland_spotted_orchid conquest:niphredil conquest:orange_tulip conquest:orpine conquest:oxeye_daisy conquest:pasque_flower conquest:pink_tulip conquest:poppy conquest:red_tulip conquest:rock_rose conquest:sea_lavender conquest:simbelmyne conquest:white_clematis conquest:white_tulip conquest:wild_dagga conquest:allium conquest:barley conquest:bean_pole conquest:beetroots conquest:cabbage conquest:carrots conquest:common_beans conquest:corn conquest:flax conquest:heirloom_wheat_crops conquest:hemp conquest:lavender conquest:peas conquest:potatoes conquest:rice conquest:thyme conquest:tobacco conquest:turnips conquest:water_mint conquest:wheat conquest:wild_basil conquest:wild_parsley conquest:wild_wheat conquest:common_meadow_grass conquest:cotton_grass conquest:dead_grass conquest:deergrass conquest:grass conquest:kentucky_bluegrass conquest:lush_grass conquest:purple_moor_grass conquest:sea_arrowgrass conquest:seagrass conquest:sweet_grass conquest:timothy_grass conquest:wavy_hair_grass conquest:pine_cones conquest:spruce_cones conquest:beautyberry_bush conquest:bilberry_bush conquest:blackberry_bush conquest:bog_blueberry_bush conquest:broom_bush conquest:dead_bush conquest:hawthorn_bush conquest:lingonberry_bush conquest:raspberry_bush conquest:alpine_sow_thristle conquest:athelas conquest:autumnal_dwarf_birch conquest:birdsfoot_trefoil conquest:bog_asphodel conquest:bottle_sedge conquest:cattails conquest:common_cow_wheat conquest:cow_parsley conquest:cross leaved heath conquest:dead_reeds conquest:dead_shrubs conquest:desert_shrub conquest:dogs_mercury conquest:dooryard_dock conquest:dry_reeds conquest:greater_fen_sedge conquest:greater_wood_rush conquest:green_meadow_fescue conquest:green_spurge conquest:heather conquest:meadow_fescue conquest:melancholy_thristle conquest:nettles conquest:nightshade conquest:papyrus conquest:purple_wolfs_bane conquest:red_common_cow_wheat conquest:rosebay_willowherb conquest:rushes conquest:wild_shrub conquest:sedge conquest:small_fescue conquest:small_scabious conquest:sweet_woodruff conquest:wild_overgrown_nettles conquest:wild_shrub conquest:wood_horsetail conquest:woodland_sedge conquest:wormwood conquest:yellow_wolfs_bane conquest:autumnal_bracken conquest:bracken conquest:dark_autumnal_bracken conquest:dead_bracken conquest:fern conquest:fern_1 conquest:fern_2 conquest:harts_tongue_fern conquest:large_fern_1 conquest:large_fern_2 conquest:large_fern_3 conquest:thick_fern conquest:tall_grass conquest:large_fern conquest:sunflower conquest:tall_lilac conquest:peony conquest:rose_bush conquest:tall_seagrass conquest:cypress conquest:young_tree conquest:young_frozen_tree conquest:cross_leaved_heath conquest:jungle_ground_cover conquest:alpine_sow_thistle conquest:duckweed conquest:red_mushroom conquest:brown_mushroom
|
||||
block.61 = minecraft:fern \
|
||||
\ conquest:acacia_sapling conquest:alder_tree_sapling conquest:apple_tree_sapling conquest:aspen_tree_sapling conquest:birch_sapling conquest:cherry_tree_sapling conquest:dark_oak_sapling conquest:downy_willow_tree_sapling conquest:gorse_tree_sapling conquest:grape_vine_sapling conquest:horse_chestnut_tree_sapling conquest:jungle_sapling conquest:larch_tree_sapling conquest:mallorn_tree_sapling conquest:oak_sapling conquest:orange_tree_sapling conquest:pear_tree_sapling conquest:pine_tree_sapling conquest:plum_tree_sapling conquest:rowan_tree_sapling conquest:spruce_sapling conquest:willow_tree_sapling conquest:angelica conquest:black_knapweed conquest:buttercups conquest:cornflower conquest:dandelion conquest:elanor conquest:goldenrod conquest:harebell conquest:lily_of_the_valley conquest:lobelia_flowers conquest:marsh_ragwort conquest:meadow_saffron conquest:mediterranean_wild_tulip conquest:moorland_spotted_orchid conquest:niphredil conquest:orange_tulip conquest:orpine conquest:oxeye_daisy conquest:pasque_flower conquest:pink_tulip conquest:poppy conquest:red_tulip conquest:rock_rose conquest:sea_lavender conquest:simbelmyne conquest:white_clematis conquest:white_tulip conquest:wild_dagga conquest:allium conquest:barley conquest:bean_pole conquest:beetroots conquest:cabbage conquest:carrots conquest:common_beans conquest:corn conquest:flax conquest:heirloom_wheat_crops conquest:hemp conquest:lavender conquest:peas conquest:potatoes conquest:rice conquest:thyme conquest:tobacco conquest:turnips conquest:water_mint conquest:wheat conquest:wild_basil conquest:wild_parsley conquest:wild_wheat conquest:common_meadow_grass conquest:cotton_grass conquest:dead_grass conquest:deergrass conquest:grass conquest:kentucky_bluegrass conquest:lush_grass conquest:purple_moor_grass conquest:sea_arrowgrass conquest:seagrass conquest:sweet_grass conquest:timothy_grass conquest:wavy_hair_grass conquest:pine_cones conquest:spruce_cones conquest:beautyberry_bush conquest:bilberry_bush conquest:blackberry_bush conquest:bog_blueberry_bush conquest:broom_bush conquest:dead_bush conquest:hawthorn_bush conquest:lingonberry_bush conquest:raspberry_bush conquest:alpine_sow_thristle conquest:athelas conquest:autumnal_dwarf_birch conquest:birdsfoot_trefoil conquest:bog_asphodel conquest:bottle_sedge conquest:cattails conquest:common_cow_wheat conquest:cow_parsley conquest:cross leaved heath conquest:dead_reeds conquest:dead_shrubs conquest:desert_shrub conquest:dogs_mercury conquest:dooryard_dock conquest:dry_reeds conquest:greater_fen_sedge conquest:greater_wood_rush conquest:green_meadow_fescue conquest:green_spurge conquest:heather conquest:meadow_fescue conquest:melancholy_thristle conquest:nettles conquest:nightshade conquest:papyrus conquest:purple_wolfs_bane conquest:red_common_cow_wheat conquest:rosebay_willowherb conquest:rushes conquest:wild_shrub conquest:sedge conquest:small_fescue conquest:small_scabious conquest:sweet_woodruff conquest:wild_overgrown_nettles conquest:wild_shrub conquest:wood_horsetail conquest:woodland_sedge conquest:wormwood conquest:yellow_wolfs_bane conquest:autumnal_bracken conquest:bracken conquest:dark_autumnal_bracken conquest:dead_bracken conquest:fern conquest:fern_1 conquest:fern_2 conquest:harts_tongue_fern conquest:cypress conquest:young_tree conquest:young_frozen_tree conquest:cross_leaved_heath conquest:jungle_ground_cover conquest:alpine_sow_thistle conquest:duckweed conquest:red_mushroom conquest:brown_mushroom
|
||||
|
||||
## air waving
|
||||
## add a newline to organize for modded blocks
|
||||
block.62=minecraft:azalea_leaves minecraft:flowering_azalea_leaves minecraft:cherry_leaves minecraft:mangrove_leaves minecraft:vine minecraft:oak_leaves minecraft:spruce_leaves minecraft:birch_leaves minecraft:jungle_leaves minecraft:acacia_leaves minecraft:dark_oak_leaves westerosblocks:vine_jasmine westerosblocks:apple_fruit_leaves westerosblocks:apricot_fruit_leaves westerosblocks:cherry_fruit_leaves westerosblocks:purple_grape_fruit_leaves westerosblocks:lemon_fruit_leaves westerosblocks:lime_fruit_leaves westerosblocks:orange_fruit_leaves westerosblocks:peach_fruit_leaves westerosblocks:plum_fruit_leaves westerosblocks:pomegranate_fruit_leaves westerosblocks:weirwood_leaves westerosblocks:hop_fruit_leaves westerosblocks:olive_fruit_leaves westerosblocks:palm_leaves westerosblocks:white_grape_fruit_leaves conquest:apple_tree_leaves conquest:ash_tree_leaves conquest:aspen_leaves conquest:autumnal_aspen_leaves conquest:dark_deciduous_leaves conquest:autumnal_beech_tree_leaves conquest:autumnal_birch_leaves conquest:autumnal_horse_chestnut_leaves conquest:autumnal_maple_leaves conquest:autumnal_oak_leaves conquest:autumnal_weeping_willow_leaves conquest:banana_tree_leaves conquest:beech_tree_leaves conquest:bright_autumnal_beech_tree_leaves conquest:bright_autumnal_weeping_willow_leaves conquest:bushy_joshua_tree_leaves conquest:caribbean_royal_palm_leaves conquest:caribbean_royal_palm_leaves_corner conquest:cherry_tree_leaves conquest:dark_beech_tree_leaves conquest:date_palm_leaves conquest:diseased_horse_chestnut_leaves conquest:downy_willow_leaves conquest:downy_willow_leaves_tip conquest:faded_autumnal_beech_tree_leaves conquest:dead_norway_spruce_needles conquest:orange_larch_leaf_top conquest:yellow_larch_leaf_top conquest:larch_leaf_top conquest:larch_spruce_leaf_top conquest:larch_leaf_slab conquest:larch_leaf_long_branch conquest:larch_leaf_branch conquest:larch_spruce_leaf_top conquest:yellow_larch_spruce_leaf_top conquest:yellow_larch_leaf_slab conquest:yellow_larch_leaf_long_branch conquest:yellow_larch_leaf_branch conquest:orange_larch_spruce_leaf_top conquest:orange_larch_leaf_slab conquest:oranch_larch_leaf_long_branch conquest:orange_larch_leaf_branch conquest:dead_spruce_leaf_top conquest:dead_spruce_leaf_slab conquest:dead_spruce_leaf_long_branch conquest:dead_spruce_leaf_branch conquest:light_spruce_leaf_top conquest:light_spruce_leaf_slab conquest:light_spruce_leaf_long_branch conquest:light_spruce_leaf_branch conquest:goat_willow_leaves conquest:gorse_leaves conquest:grape_vine_leaves conquest:holly_leaves conquest:horse_chestnut_leaves conquest:joshua_tree_leaves conquest:lemon_tree_leaves conquest:old_caribbean_royal_palm_leaves conquest:old_caribbean_royal_palm_leaves_corner conquest:olive_tree_leaves conquest:orange_tree_leaves conquest:pear_tree_leaves conquest:plum_tree_leaves conquest:rowan_leaves conquest:weeping_willow_leaves conquest:wisteria_leaves conquest:yellow_autumnal_weeping_willow_leaves conquest:dark_spruce_needles conquest:dead_pine_needles conquest:dead_spruce_needles conquest:larch_needles conquest:light_spruce_needles conquest:orange_autumnal_larch_needles conquest:pine_needles conquest:yellow_autumnal_larch_needles conquest:dead_deciduous_branches conquest:mistletoe_garland conquest:lilac conquest:pink_cherry_blossoms conquest:purple_cherry_blossoms conquest:red_cherry_blossoms conquest:white_cherry_blossoms conquest:wisteria_blossoms conquest:hanging_moss conquest:lianas conquest:moss_vines conquest:spruce_leaf_top conquest:spruce_leaf_branch conquest:spruce_leaf_slab conquest:spruce_leaf_long_branch conquest:thick_hanging_ivy conquest:thick_ivy conquest:hanging_roots conquest:acacia_branch_tip conquest:acacia_branch_tip_45 conquest:acacia_branch_tip_2 conquest:acacia_branch_tip_2_45 conquest:beech_branch_tip conquest:beech_branch_tip_45 conquest:beech_branch_tip_2 conquest:beech _branch_tip_2_45 conquest:birch_branch_tip conquest:birch_branch_tip_45 conquest:birch_branch_tip_2 conquest:birch_branch_tip_2_45 conquest:oak_branch_tip conquest:oak_branch_tip_45 conquest:oak_branch_tip_2 conquest:oak_branch_tip_2_45 conquest:spruce_branch_tip conquest:spruce_branch_tip_45 conquest:spruce_branch_tip_2 conquest:spruce_branch_tip_2_45 conquest:orange_pine_branch_tip conquest:orange_pine_branch_tip_45 conquest:orange_pine_branch_tip_2 conquest:orange_pine_branch_tip_2_45
|
||||
block.62=minecraft:azalea_leaves minecraft:flowering_azalea_leaves minecraft:cherry_leaves minecraft:mangrove_leaves minecraft:oak_leaves minecraft:spruce_leaves minecraft:birch_leaves minecraft:jungle_leaves minecraft:acacia_leaves minecraft:dark_oak_leaves \
|
||||
\ westerosblocks:vine_jasmine westerosblocks:apple_fruit_leaves westerosblocks:apricot_fruit_leaves westerosblocks:cherry_fruit_leaves westerosblocks:purple_grape_fruit_leaves westerosblocks:lemon_fruit_leaves westerosblocks:lime_fruit_leaves westerosblocks:orange_fruit_leaves westerosblocks:peach_fruit_leaves westerosblocks:plum_fruit_leaves westerosblocks:pomegranate_fruit_leaves westerosblocks:weirwood_leaves westerosblocks:hop_fruit_leaves westerosblocks:olive_fruit_leaves westerosblocks:palm_leaves westerosblocks:white_grape_fruit_leaves \
|
||||
\ conquest:apple_tree_leaves conquest:ash_tree_leaves conquest:aspen_leaves conquest:autumnal_aspen_leaves conquest:dark_deciduous_leaves conquest:autumnal_beech_tree_leaves conquest:autumnal_birch_leaves conquest:autumnal_horse_chestnut_leaves conquest:autumnal_maple_leaves conquest:autumnal_oak_leaves conquest:autumnal_weeping_willow_leaves conquest:banana_tree_leaves conquest:beech_tree_leaves conquest:bright_autumnal_beech_tree_leaves conquest:bright_autumnal_weeping_willow_leaves conquest:bushy_joshua_tree_leaves conquest:caribbean_royal_palm_leaves conquest:caribbean_royal_palm_leaves_corner conquest:cherry_tree_leaves conquest:dark_beech_tree_leaves conquest:date_palm_leaves conquest:diseased_horse_chestnut_leaves conquest:downy_willow_leaves conquest:downy_willow_leaves_tip conquest:faded_autumnal_beech_tree_leaves conquest:dead_norway_spruce_needles conquest:orange_larch_leaf_top conquest:yellow_larch_leaf_top conquest:larch_leaf_top conquest:larch_spruce_leaf_top conquest:larch_leaf_slab conquest:larch_leaf_long_branch conquest:larch_leaf_branch conquest:larch_spruce_leaf_top conquest:yellow_larch_spruce_leaf_top conquest:yellow_larch_leaf_slab conquest:yellow_larch_leaf_long_branch conquest:yellow_larch_leaf_branch conquest:orange_larch_spruce_leaf_top conquest:orange_larch_leaf_slab conquest:oranch_larch_leaf_long_branch conquest:orange_larch_leaf_branch conquest:dead_spruce_leaf_top conquest:dead_spruce_leaf_slab conquest:dead_spruce_leaf_long_branch conquest:dead_spruce_leaf_branch conquest:light_spruce_leaf_top conquest:light_spruce_leaf_slab conquest:light_spruce_leaf_long_branch conquest:light_spruce_leaf_branch conquest:goat_willow_leaves conquest:gorse_leaves conquest:grape_vine_leaves conquest:holly_leaves conquest:horse_chestnut_leaves conquest:joshua_tree_leaves conquest:lemon_tree_leaves conquest:old_caribbean_royal_palm_leaves conquest:old_caribbean_royal_palm_leaves_corner conquest:olive_tree_leaves conquest:orange_tree_leaves conquest:pear_tree_leaves conquest:plum_tree_leaves conquest:rowan_leaves conquest:weeping_willow_leaves conquest:wisteria_leaves conquest:yellow_autumnal_weeping_willow_leaves conquest:dark_spruce_needles conquest:dead_pine_needles conquest:dead_spruce_needles conquest:larch_needles conquest:light_spruce_needles conquest:orange_autumnal_larch_needles conquest:pine_needles conquest:yellow_autumnal_larch_needles conquest:dead_deciduous_branches conquest:mistletoe_garland conquest:lilac conquest:pink_cherry_blossoms conquest:purple_cherry_blossoms conquest:red_cherry_blossoms conquest:white_cherry_blossoms conquest:wisteria_blossoms conquest:hanging_moss conquest:lianas conquest:moss_vines conquest:spruce_leaf_top conquest:spruce_leaf_branch conquest:spruce_leaf_slab conquest:spruce_leaf_long_branch conquest:thick_hanging_ivy conquest:thick_ivy conquest:hanging_roots conquest:acacia_branch_tip conquest:acacia_branch_tip_45 conquest:acacia_branch_tip_2 conquest:acacia_branch_tip_2_45 conquest:beech_branch_tip conquest:beech_branch_tip_45 conquest:beech_branch_tip_2 conquest:beech _branch_tip_2_45 conquest:birch_branch_tip conquest:birch_branch_tip_45 conquest:birch_branch_tip_2 conquest:birch_branch_tip_2_45 conquest:oak_branch_tip conquest:oak_branch_tip_45 conquest:oak_branch_tip_2 conquest:oak_branch_tip_2_45 conquest:spruce_branch_tip conquest:spruce_branch_tip_45 conquest:spruce_branch_tip_2 conquest:spruce_branch_tip_2_45 conquest:orange_pine_branch_tip conquest:orange_pine_branch_tip_45 conquest:orange_pine_branch_tip_2 conquest:orange_pine_branch_tip_2_45
|
||||
|
||||
|
||||
####### ----- blocks with SSS ----- #######
|
||||
|
||||
## strong sss
|
||||
block.80=minecraft:flowering_azalea minecraft:tall_seagrass minecraft:seagrass minecraft:kelp minecraft:large_fern:half=lower 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
|
||||
block.80 = minecraft:kelp_plant minecraft:peony minecraft:rose_bush minecraft:lilac minecraft:packed_ice minecraft:blue_ice 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.81=minecraft:amethyst_block minecraft:budding_amethyst minecraft:small_amethyst_bud 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 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 minecraft:spore_blossom minecraft:cave_vines:berries=false minecraft:cave_vines_plant:berries=false 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
|
||||
block.81=minecraft:amethyst_block minecraft:budding_amethyst minecraft:small_amethyst_bud minecraft:pitcher_plant 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 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 minecraft:spore_blossom minecraft:cave_vines_plant:berries=false 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.82=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
|
||||
block.82=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
|
||||
|
||||
## weak sss
|
||||
block.83=minecraft:white_wall_banner minecraft:orange_wall_banner minecraft:magenta_wall_banner minecraft:light_blue_wall_banner minecraft:yellow_wall_banner minecraft:lime_wall_banner minecraft:pink_wall_banner minecraft:gray_wall_banner minecraft:light_gray_wall_banner minecraft:cyan_wall_banner minecraft:purple_wall_banner minecraft:blue_wall_banner minecraft:brown_wall_banner minecraft:green_wall_banner minecraft:red_wall_banner minecraft:black_wall_banner minecraft:white_banner minecraft:orange_banner minecraft:magenta_banner minecraft:light_blue_banner minecraft:yellow_banner minecraft:lime_banner minecraft:pink_banner minecraft:gray_banner minecraft:light_gray_banner minecraft:cyan_banner minecraft:purple_banner minecraft:blue_banner minecraft:brown_banner minecraft:green_banner minecraft:red_banner minecraft:black_banner westerosblocks:renly_banner westerosblocks:redwyne_banner westerosblocks:grafton_banner westerosblocks:grey_banner westerosblocks:red_banner westerosblocks:black_banner westerosblocks:the_faith_of_the_seven_banner westerosblocks:cream_banner westerosblocks:blue_banner westerosblocks:brown_banner westerosblocks:cyan_banner westerosblocks:green_banner westerosblocks:orange_banner westerosblocks:pink_banner westerosblocks:purple_banner westerosblocks:lord_of_light_rhllor_banner westerosblocks:yellow_banner westerosblocks:arryn_banner westerosblocks:baratheon_banner westerosblocks:bolton_banner westerosblocks:dayne_banner westerosblocks:frey_banner westerosblocks:greyjoy_banner westerosblocks:hightower_banner westerosblocks:lannister_banner westerosblocks:manderly_banner westerosblocks:martell_banner westerosblocks:stannis_banner westerosblocks:stark_banner westerosblocks:targaryen_banner westerosblocks:tarly_banner westerosblocks:tully_banner westerosblocks:tyrell_banner
|
||||
block.83=minecraft:white_wall_banner minecraft:orange_wall_banner minecraft:magenta_wall_banner minecraft:light_blue_wall_banner minecraft:yellow_wall_banner minecraft:lime_wall_banner minecraft:pink_wall_banner minecraft:gray_wall_banner minecraft:light_gray_wall_banner minecraft:cyan_wall_banner minecraft:purple_wall_banner minecraft:blue_wall_banner minecraft:brown_wall_banner minecraft:green_wall_banner minecraft:red_wall_banner minecraft:black_wall_banner minecraft:white_banner minecraft:orange_banner minecraft:magenta_banner minecraft:light_blue_banner minecraft:yellow_banner minecraft:lime_banner minecraft:pink_banner minecraft:gray_banner minecraft:light_gray_banner minecraft:cyan_banner minecraft:purple_banner minecraft:blue_banner minecraft:brown_banner minecraft:green_banner minecraft:red_banner minecraft:black_banner \
|
||||
\ westerosblocks:renly_banner westerosblocks:redwyne_banner westerosblocks:grafton_banner westerosblocks:grey_banner westerosblocks:red_banner westerosblocks:black_banner westerosblocks:the_faith_of_the_seven_banner westerosblocks:cream_banner westerosblocks:blue_banner westerosblocks:brown_banner westerosblocks:cyan_banner westerosblocks:green_banner westerosblocks:orange_banner westerosblocks:pink_banner westerosblocks:purple_banner westerosblocks:lord_of_light_rhllor_banner westerosblocks:yellow_banner westerosblocks:arryn_banner westerosblocks:baratheon_banner westerosblocks:bolton_banner westerosblocks:dayne_banner westerosblocks:frey_banner westerosblocks:greyjoy_banner westerosblocks:hightower_banner westerosblocks:lannister_banner westerosblocks:manderly_banner westerosblocks:martell_banner westerosblocks:stannis_banner westerosblocks:stark_banner westerosblocks:targaryen_banner westerosblocks:tarly_banner westerosblocks:tully_banner westerosblocks:tyrell_banner
|
||||
|
||||
## weird blocks
|
||||
block.84=minecraft:sand minecraft:red_sand
|
||||
|
@ -101,7 +101,13 @@ uniform vec3 cameraPosition;
|
||||
void main() {
|
||||
|
||||
#ifdef DH_OVERDRAW_PREVENTION
|
||||
if(clamp(1.0-length(pos.xyz)/max(far - 32.0,32.0),0.0,1.0) > 0.0 ){
|
||||
#if OVERDRAW_MAX_DISTANCE == 0
|
||||
float maxOverdrawDistance = far;
|
||||
#else
|
||||
float maxOverdrawDistance = OVERDRAW_MAX_DISTANCE;
|
||||
#endif
|
||||
|
||||
if(clamp(1.0-length(pos.xyz)/clamp(far - 32.0,32.0,maxOverdrawDistance),0.0,1.0) > 0.0 ){
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
@ -80,8 +80,10 @@ void main() {
|
||||
if(dhMaterialId == DH_BLOCK_ILLUMINATED || gl_MultiTexCoord1.x >= 0.95) EMISSIVE = 0.5;
|
||||
|
||||
SSSAMOUNT = 0.0;
|
||||
if (dhMaterialId == DH_BLOCK_LEAVES) SSSAMOUNT = 1.0;
|
||||
if (dhMaterialId == DH_BLOCK_SNOW) SSSAMOUNT = 0.5;
|
||||
#if defined DH_SUBSURFACE_SCATTERING
|
||||
if (dhMaterialId == DH_BLOCK_LEAVES) SSSAMOUNT = 1.0;
|
||||
if (dhMaterialId == DH_BLOCK_SNOW) SSSAMOUNT = 0.5;
|
||||
#endif
|
||||
|
||||
// a mask for DH terrain in general.
|
||||
float MATERIALS = 0.65;
|
||||
|
@ -252,7 +252,6 @@ vec3 applyBump(mat3 tbnMatrix, vec3 bump, float puddle_values){
|
||||
return normalize(bump*tbnMatrix);
|
||||
}
|
||||
|
||||
varying vec4 tangent;
|
||||
|
||||
/* RENDERTARGETS:2,7 */
|
||||
void main() {
|
||||
@ -269,11 +268,16 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
float transition = exp(-25* pow(clamp(1.0 - length(playerPos)/(far-8),0.0,1.0),2));
|
||||
|
||||
#ifdef DH_OVERDRAW_PREVENTION
|
||||
if(length(playerPos) < max(far-16*4,16) ){ discard; return;}
|
||||
#if OVERDRAW_MAX_DISTANCE == 0
|
||||
float maxOverdrawDistance = far;
|
||||
#else
|
||||
float maxOverdrawDistance = OVERDRAW_MAX_DISTANCE;
|
||||
#endif
|
||||
|
||||
if(length(playerPos) < clamp(far-16*4, 16, maxOverdrawDistance) ){ discard; return;}
|
||||
#endif
|
||||
|
||||
|
||||
if(iswater){
|
||||
if(iswater && abs(normals.y) > 0.0){
|
||||
vec3 posxz = playerPos+cameraPosition;
|
||||
|
||||
vec3 bump = normalize(getWaveNormal(posxz, true));
|
||||
@ -388,7 +392,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
#ifdef SNELLS_WINDOW
|
||||
if(isEyeInWater == 1) fresnel = pow(clamp(1.5 + normalDotEye,0.0,1.0), 25.0);
|
||||
#endif
|
||||
#ifdef SCREENSPACE_REFLECTIONS
|
||||
#if defined SCREENSPACE_REFLECTIONS && defined DH_SCREENSPACE_REFLECTIONS
|
||||
vec3 rtPos = rayTrace(reflectedVector, viewPos, interleaved_gradientNoise(), fresnel, false);
|
||||
if (rtPos.z < 1.){
|
||||
vec3 previousPosition = mat3(gbufferModelViewInverse) * DH_toScreenSpace(rtPos) + gbufferModelViewInverse[3].xyz + cameraPosition-previousCameraPosition;
|
||||
@ -401,7 +405,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
}
|
||||
#endif
|
||||
#ifdef WATER_BACKGROUND_SPECULAR
|
||||
BackgroundReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 30.0;
|
||||
BackgroundReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 30.0;
|
||||
#endif
|
||||
#ifdef WATER_SUN_SPECULAR
|
||||
SunReflection = Direct_lighting * GGX(normalize(normals), -normalize(viewPos), normalize(WsunVec2), roughness, f0) * (1.0-Reflections.a);
|
||||
@ -424,7 +428,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
#endif
|
||||
|
||||
#ifdef DH_OVERDRAW_PREVENTION
|
||||
float distancefade = min(max(1.0 - length(playerPos)/max(far-16*4,16),0.0)*5,1.0);
|
||||
float distancefade = min(max(1.0 - length(playerPos)/clamp(far-16*4, 16, maxOverdrawDistance),0.0)*5,1.0);
|
||||
|
||||
if(texture2D(depthtex0, gl_FragCoord.xy*texelSize).x < 1.0 || distancefade > 0.0){
|
||||
gl_FragData[0].a = 0.0;
|
||||
|
@ -96,8 +96,8 @@ void main() {
|
||||
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||
#ifdef OVERWORLD_SHADER
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -228,7 +228,7 @@ vec3 toClipSpace3(vec3 viewSpacePosition) {
|
||||
return projMAD(gbufferProjection, viewSpacePosition) / -viewSpacePosition.z * 0.5 + 0.5;
|
||||
}
|
||||
|
||||
flat varying vec3 WsunVec2;
|
||||
flat varying vec3 WsunVec2;
|
||||
const float mincoord = 1.0/4096.0;
|
||||
const float maxcoord = 1.0-mincoord;
|
||||
|
||||
@ -245,6 +245,7 @@ const float maxcoord = 1.0-mincoord;
|
||||
return texture2DGradARB(texture,fract(coord)*vtexcoordam.pq+vtexcoordam.st,dcdx,dcdy);
|
||||
}
|
||||
#endif
|
||||
|
||||
uniform float near;
|
||||
// uniform float far;
|
||||
float ld(float dist) {
|
||||
@ -368,7 +369,7 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(viewPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(feetPlayerPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
#endif
|
||||
|
||||
#ifdef WEATHER
|
||||
@ -422,7 +423,12 @@ void main() {
|
||||
#endif
|
||||
|
||||
AmbientLightColor = averageSkyCol_Clouds / 30.0;
|
||||
AmbientLightColor *= 2.5;
|
||||
#ifdef IS_IRIS
|
||||
AmbientLightColor *= 2.5;
|
||||
#else
|
||||
AmbientLightColor *= 0.5;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
|
@ -105,7 +105,7 @@ void main() {
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
if(heldItemId > 999 || heldItemId2 > 999) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
|
||||
@ -147,8 +147,8 @@ void main() {
|
||||
|
||||
WsunVec = lightCol.a * normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0) / 2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0) / 2.0, 0.0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -313,23 +313,25 @@ void main() {
|
||||
float torchlightmap = lmtexcoord.z;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(fragpos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(worldpos-cameraPosition)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
|
||||
#ifdef HAND
|
||||
torchlightmap *= 0.9;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
float lightmap = clamp( (lmtexcoord.w-0.8) * 10.0,0.,1.);
|
||||
float lightmap = clamp( (lmtexcoord.w-0.9) * 10.0,0.,1.);
|
||||
|
||||
float rainfall = rainStrength * noPuddleAreas;
|
||||
float Puddle_shape = 0.;
|
||||
float rainfall = 0.0;
|
||||
float Puddle_shape = 0.0;
|
||||
|
||||
#if defined Puddles && defined WORLD && !defined ENTITIES && !defined HAND
|
||||
Puddle_shape = (1.0 - clamp(exp(-15 * pow(texture2D(noisetex, worldpos.xz * (0.020 * Puddle_Size) ).b ,5)),0,1)) * lightmap ;
|
||||
Puddle_shape *= clamp( viewToWorld(normal).y*0.5+0.5 ,0.0,1.0);
|
||||
Puddle_shape *= rainfall;
|
||||
rainfall = rainStrength * noPuddleAreas * lightmap;
|
||||
|
||||
Puddle_shape = clamp(lightmap - exp(-15.0 * pow(texture2D(noisetex, worldpos.xz * (0.020 * Puddle_Size) ).b,5.0)),0.0,1.0);
|
||||
Puddle_shape *= clamp( viewToWorld(normal).y*0.5+0.5,0.0,1.0);
|
||||
Puddle_shape *= rainStrength * noPuddleAreas ;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -446,12 +448,12 @@ void main() {
|
||||
#ifdef HAND
|
||||
if (Albedo.a > 0.1){
|
||||
Albedo.a = 0.75;
|
||||
gl_FragData[3] = vec4(0.0);
|
||||
} else {
|
||||
Albedo.a = 1.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined HAND || defined ENTITIES || defined BLOCKENTITIES
|
||||
#if defined PARTICLE_RENDERING_FIX && (defined ENTITIES || defined BLOCKENTITIES)
|
||||
gl_FragData[3] = vec4(0.0);
|
||||
#endif
|
||||
|
||||
@ -472,16 +474,7 @@ void main() {
|
||||
NormalTex.xy = NormalTex.xy * 2.0-1.0;
|
||||
NormalTex.z = sqrt(max(1.0 - dot(NormalTex.xy, NormalTex.xy), 0.0));
|
||||
|
||||
// #if defined HEIGTHMAP_DEPTH_OFFSET && !defined HAND
|
||||
// gl_FragDepth = gl_FragCoord.z;
|
||||
// vec3 truePos = fragpos;
|
||||
// truePos.z -= Heightmap * POM_DEPTH * (1.0 + ld(truePos.z));
|
||||
|
||||
// gl_FragDepth = toClipSpace3(truePos).z;
|
||||
// #endif
|
||||
|
||||
normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) );
|
||||
// normal = applyBump(tbnMatrix, NormalTex.xyz, 0.0);
|
||||
normal = applyBump(tbnMatrix, NormalTex.xyz, 1.0-Puddle_shape);
|
||||
#endif
|
||||
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
@ -491,8 +484,8 @@ void main() {
|
||||
#ifdef WORLD
|
||||
vec4 SpecularTex = texture2D_POMSwitch(specular, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM,textureLOD);
|
||||
|
||||
SpecularTex.r = max(SpecularTex.r, Puddle_shape);
|
||||
SpecularTex.g = max(SpecularTex.g, Puddle_shape*0.02);
|
||||
SpecularTex.r = max(SpecularTex.r, rainfall);
|
||||
SpecularTex.g = max(SpecularTex.g, max(Puddle_shape*0.02,0.02));
|
||||
|
||||
gl_FragData[1].rg = SpecularTex.rg;
|
||||
|
||||
@ -548,12 +541,13 @@ void main() {
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
|
||||
#ifdef WORLD
|
||||
|
||||
#ifdef Puddles
|
||||
float porosity = 0.4;
|
||||
|
||||
#ifdef Porosity
|
||||
porosity = SpecularTex.z >= 64.5/255.0 ? 0.0 : (SpecularTex.z*255.0/64.0)*0.65;
|
||||
#endif
|
||||
|
||||
if(SpecularTex.g < 229.5/255.0) Albedo.rgb = mix(Albedo.rgb, vec3(0), Puddle_shape*porosity);
|
||||
#endif
|
||||
|
||||
@ -561,9 +555,8 @@ void main() {
|
||||
vec2 PackLightmaps = vec2(torchlightmap, lmtexcoord.w);
|
||||
|
||||
vec4 data1 = clamp( encode(viewToWorld(normal), PackLightmaps), 0.0, 1.0);
|
||||
// gl_FragData[0] = vec4(.0);
|
||||
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
||||
|
||||
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
||||
|
||||
gl_FragData[2] = vec4(FlatNormals * 0.5 + 0.5, VanillaAO);
|
||||
#endif
|
||||
|
@ -72,6 +72,7 @@ uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
uniform int isEyeInWater;
|
||||
|
||||
flat varying float SSSAMOUNT;
|
||||
flat varying float EMISSIVE;
|
||||
@ -178,7 +179,13 @@ float densityAtPos(in vec3 pos){
|
||||
float luma(vec3 color) {
|
||||
return dot(color,vec3(0.21, 0.72, 0.07));
|
||||
}
|
||||
|
||||
vec3 viewToWorld(vec3 viewPos) {
|
||||
vec4 pos;
|
||||
pos.xyz = viewPos;
|
||||
pos.w = 0.0;
|
||||
pos = gbufferModelViewInverse * pos;
|
||||
return pos.xyz;
|
||||
}
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -225,7 +232,7 @@ void main() {
|
||||
blockID = mc_Entity.x;
|
||||
// velocity = at_velocity;
|
||||
|
||||
if(mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL || mc_Entity.x == BLOCK_GRASS_SHORT) normalMat.a = 0.60;
|
||||
if(mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL || mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_GRASS_TALL_LOWER || mc_Entity.x == BLOCK_GRASS_TALL_UPPER ) normalMat.a = 0.60;
|
||||
|
||||
|
||||
PORTAL = 0;
|
||||
@ -238,7 +245,6 @@ void main() {
|
||||
#endif
|
||||
|
||||
NameTags = 0;
|
||||
|
||||
|
||||
#ifdef ENTITIES
|
||||
// disallow POM to work on item frames.
|
||||
@ -260,6 +266,11 @@ void main() {
|
||||
LIGHTNING = 0;
|
||||
// if(NameTags > 0) EMISSIVE = 0.9;
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId > 999 || heldItemId2 > 999 ) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
// normal block lightsources
|
||||
if(mc_Entity.x >= 100 && mc_Entity.x < 300) EMISSIVE = 0.5;
|
||||
|
||||
@ -274,13 +285,6 @@ void main() {
|
||||
/////// ----- SSS STUFF ----- ///////
|
||||
SSSAMOUNT = 0.0;
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WORLD
|
||||
/////// ----- SSS ON BLOCKS ----- ///////
|
||||
// strong
|
||||
@ -331,26 +335,35 @@ if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_I
|
||||
|
||||
|
||||
#ifdef WAVY_PLANTS
|
||||
bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
|
||||
// also use normal, so up/down facing geometry does not get detatched from its model parts.
|
||||
bool InterpolateFromBase = gl_MultiTexCoord0.t < max(mc_midTexCoord.t, abs(viewToWorld(FlatNormals).y));
|
||||
|
||||
if (
|
||||
if(
|
||||
(
|
||||
mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL ||
|
||||
mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_GRASS_TALL_UPPER ||
|
||||
mc_Entity.x == BLOCK_SAPLING
|
||||
) && istopv && abs(position.z) < 64.0
|
||||
) {
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
worldpos.xyz += calcMovePlants(worldpos.xyz)*lmtexcoord.w - cameraPosition;
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
}
|
||||
// these wave off of the ground. the area connected to the ground does not wave.
|
||||
(InterpolateFromBase && (mc_Entity.x == BLOCK_GRASS_TALL_LOWER || mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_SAPLING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL))
|
||||
|
||||
// these wave off of the ceiling. the area connected to the ceiling does not wave.
|
||||
|| (!InterpolateFromBase && (mc_Entity.x == 17))
|
||||
|
||||
// these wave off of the air. they wave uniformly
|
||||
|| (mc_Entity.x == BLOCK_GRASS_TALL_UPPER || mc_Entity.x == BLOCK_AIR_WAVING)
|
||||
|
||||
) && abs(position.z) < 64.0
|
||||
){
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz;
|
||||
vec3 UnalteredWorldpos = worldpos;
|
||||
|
||||
// apply displacement for waving plant blocks
|
||||
worldpos += calcMovePlants(worldpos + cameraPosition) * max(lmtexcoord.w,0.5);
|
||||
|
||||
// apply displacement for waving leaf blocks specifically, overwriting the other waving mode. these wave off of the air. they wave uniformly
|
||||
if(mc_Entity.x == BLOCK_AIR_WAVING) worldpos = UnalteredWorldpos + calcMoveLeaves(worldpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*lmtexcoord.w;
|
||||
|
||||
if (mc_Entity.x == BLOCK_AIR_WAVING && abs(position.z) < 64.0) {
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
worldpos.xyz += calcMoveLeaves(worldpos.xyz, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*lmtexcoord.w - cameraPosition;
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
}
|
||||
#endif
|
||||
|
||||
gl_Position = toClipSpace3(position);
|
||||
#endif
|
||||
|
||||
|
@ -66,6 +66,9 @@ varying vec4 tangent;
|
||||
varying vec4 normalMat;
|
||||
varying vec3 binormal;
|
||||
varying vec3 flatnormal;
|
||||
#ifdef LARGE_WAVE_DISPLACEMENT
|
||||
varying vec3 shitnormal;
|
||||
#endif
|
||||
|
||||
|
||||
flat varying float exposure;
|
||||
@ -580,9 +583,20 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
vec3 normal = normalMat.xyz; // in viewSpace
|
||||
|
||||
#ifdef LARGE_WAVE_DISPLACEMENT
|
||||
if (isWater){
|
||||
normal = viewToWorld(normal) ;
|
||||
normal.xz = shitnormal.xy;
|
||||
normal = worldToView(normal);
|
||||
}
|
||||
#endif
|
||||
|
||||
vec3 worldSpaceNormal = viewToWorld(normal).xyz;
|
||||
vec2 TangentNormal = vec2(0); // for refractions
|
||||
|
||||
|
||||
|
||||
vec3 tangent2 = normalize(cross(tangent.rgb,normal)*tangent.w);
|
||||
mat3 tbnMatrix = mat3(tangent.x, tangent2.x, normal.x,
|
||||
tangent.y, tangent2.y, normal.y,
|
||||
@ -638,7 +652,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
#endif
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS*clamp( pow(max(1.0-length(viewPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS*clamp( pow(max(1.0-length(feetPlayerPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
#endif
|
||||
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
|
@ -17,6 +17,7 @@ varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
uniform sampler2D noisetex;
|
||||
flat varying float exposure;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
@ -35,7 +36,12 @@ varying vec3 binormal;
|
||||
varying vec4 tangent;
|
||||
varying vec3 flatnormal;
|
||||
|
||||
#ifdef LARGE_WAVE_DISPLACEMENT
|
||||
varying vec3 shitnormal;
|
||||
#endif
|
||||
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform mat4 gbufferModelView;
|
||||
varying vec3 viewVector;
|
||||
|
||||
flat varying int glass;
|
||||
@ -45,6 +51,7 @@ attribute vec4 mc_Entity;
|
||||
|
||||
|
||||
uniform vec3 sunPosition;
|
||||
uniform vec3 cameraPosition;
|
||||
uniform float sunElevation;
|
||||
|
||||
varying vec4 tangent_other;
|
||||
@ -80,6 +87,28 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),-viewSpacePosition.z);
|
||||
}
|
||||
|
||||
|
||||
float getWave (vec3 pos, float range){
|
||||
return pow(1.0-texture2D(noisetex, (pos.xz + frameTimeCounter * WATER_WAVE_SPEED)/150.0).b,2) * WATER_WAVE_STRENGTH / range;
|
||||
}
|
||||
vec3 getWaveNormal(vec3 posxz, float range){
|
||||
|
||||
float deltaPos = 0.5;
|
||||
|
||||
vec3 coord = posxz;
|
||||
|
||||
float h0 = getWave(coord,range);
|
||||
float h1 = getWave(coord - vec3(deltaPos,0.0,0.0),range);
|
||||
float h3 = getWave(coord - vec3(0.0,0.0,deltaPos),range);
|
||||
|
||||
|
||||
float xDelta = (h1-h0)/deltaPos*1.5;
|
||||
float yDelta = (h3-h0)/deltaPos*1.5;
|
||||
|
||||
vec3 wave = normalize(vec3(xDelta, yDelta, 1.0-pow(abs(xDelta+yDelta),2.0)));
|
||||
|
||||
return wave;
|
||||
}
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -95,17 +124,28 @@ void main() {
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
#ifdef LARGE_WAVE_DISPLACEMENT
|
||||
if(mc_Entity.x == 8.0) {
|
||||
vec3 displacedPos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float range = min(1.0 + pow(length(displacedPos - cameraPosition) / min(far,256.0),2.0), 256.0);
|
||||
#else
|
||||
float range = min(1.0 + pow(length(displacedPos - cameraPosition) / 256,2.0), 256.0);
|
||||
#endif
|
||||
|
||||
displacedPos.y -= (1.0-getWave(displacedPos, range)) * 0.5 - 0.2;
|
||||
shitnormal = getWaveNormal(displacedPos, range);
|
||||
position = mat3(gbufferModelView) * (displacedPos - cameraPosition) + gbufferModelView[3].xyz;
|
||||
}
|
||||
#endif
|
||||
gl_Position = toClipSpace3(position);
|
||||
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
if(heldItemId > 999 || heldItemId2 > 999) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// 1.0 = water mask
|
||||
// 0.9 = entity mask
|
||||
// 0.8 = reflective entities
|
||||
@ -141,7 +181,8 @@ void main() {
|
||||
|
||||
flatnormal = normalMat.xyz;
|
||||
|
||||
viewVector = ( gl_ModelViewMatrix * gl_Vertex).xyz;
|
||||
viewVector = position.xyz;
|
||||
// viewVector = (gl_ModelViewMatrix * gl_Vertex).xyz;
|
||||
viewVector = normalize(tbnMatrix * viewVector);
|
||||
|
||||
|
||||
@ -158,8 +199,8 @@ void main() {
|
||||
// WsunVec = normalize(LightDir);
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
#ifndef DH_AMBIENT_OCCLUSION
|
||||
#undef DISTANT_HORIZONS
|
||||
#endif
|
||||
|
||||
|
||||
flat varying vec3 WsunVec;
|
||||
flat varying vec2 TAA_Offset;
|
||||
|
@ -158,10 +158,10 @@ vec3 toScreenSpace(vec3 p) {
|
||||
|
||||
|
||||
|
||||
#define TESTTHINGYG
|
||||
|
||||
#include "/lib/color_transforms.glsl"
|
||||
#include "/lib/waterBump.glsl"
|
||||
#include "/lib/sky_gradient.glsl"
|
||||
|
||||
#include "/lib/Shadow_Params.glsl"
|
||||
#include "/lib/Shadows.glsl"
|
||||
@ -187,6 +187,7 @@ float ld(float dist) {
|
||||
return (2.0 * near) / (far + near - dist * (far - near));
|
||||
}
|
||||
|
||||
#include "/lib/sky_gradient.glsl"
|
||||
vec3 decode (vec2 encn){
|
||||
vec3 n = vec3(0.0);
|
||||
encn = encn * 2.0 - 1.0;
|
||||
@ -231,7 +232,9 @@ vec3 normVec (vec3 vec){
|
||||
float lengthVec (vec3 vec){
|
||||
return sqrt(dot(vec,vec));
|
||||
}
|
||||
#define fsign(a) (clamp((a)*1e35,0.,1.)*2.-1.)
|
||||
|
||||
// #define fsign(a) (clamp((a)*1e35,0.,1.)*2.-1.)
|
||||
|
||||
float triangularize(float dither)
|
||||
{
|
||||
float center = dither*2.0-1.0;
|
||||
@ -362,7 +365,7 @@ vec3 worldToView(vec3 worldPos) {
|
||||
}
|
||||
|
||||
vec2 SSRT_Shadows(vec3 viewPos, bool depthCheck, vec3 lightDir, float noise, bool isSSS, bool hand){
|
||||
|
||||
|
||||
float handSwitch = hand ? 1.0 : 0.0;
|
||||
|
||||
float steps = 16.0;
|
||||
@ -385,41 +388,29 @@ vec2 SSRT_Shadows(vec3 viewPos, bool depthCheck, vec3 lightDir, float noise, boo
|
||||
vec3 direction = toClipSpace3_DH(viewPos + lightDir*rayLength, depthCheck) - clipPosition; //convert to clip space
|
||||
direction.xyz = direction.xyz / max(abs(direction.x)/texelSize.x, abs(direction.y)/texelSize.y); //fixed step size
|
||||
|
||||
float Stepmult = depthCheck ? (isSSS ? 0.5 : 6.0) : (isSSS ? 1.0 : 3.0);
|
||||
float Stepmult = depthCheck ? (isSSS ? 1.0 : 6.0) : (isSSS ? 1.0 : 3.0);
|
||||
|
||||
// Stepmult = depthCheck ? 0.5 : 1.0;
|
||||
|
||||
|
||||
vec3 rayDir = direction * Stepmult * vec3(RENDER_SCALE,1.0);
|
||||
|
||||
vec3 screenPos = clipPosition * vec3(RENDER_SCALE,1.0) + rayDir*noise;
|
||||
if(isSSS) screenPos -= rayDir*0.9;
|
||||
vec3 rayDir = direction * Stepmult * vec3(RENDER_SCALE,1.0) ;
|
||||
vec3 screenPos = clipPosition * vec3(RENDER_SCALE,1.0) + rayDir * noise;
|
||||
|
||||
for (int i = 0; i < int(steps); i++) {
|
||||
|
||||
screenPos += rayDir;
|
||||
|
||||
|
||||
float samplePos = convertHandDepth_2(texture2D(depthtex1, screenPos.xy).x, hand);
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
if(depthCheck) samplePos = texture2D(dhDepthTex1, screenPos.xy).x;
|
||||
#endif
|
||||
|
||||
if(samplePos <= screenPos.z) {
|
||||
if(samplePos < screenPos.z) {
|
||||
vec2 linearZ = vec2(linearizeDepthFast(screenPos.z, _near, _far), linearizeDepthFast(samplePos, _near, _far));
|
||||
float calcthreshold = abs(linearZ.x - linearZ.y) / linearZ.x;
|
||||
|
||||
bool depthThreshold1 = calcthreshold < mix(0.015, 0.035, handSwitch);
|
||||
bool depthThreshold2 = calcthreshold < 0.05;
|
||||
|
||||
if (depthThreshold1) Shadow = 0.0;
|
||||
|
||||
if (depthThreshold2) SSS = i/steps;
|
||||
|
||||
if (calcthreshold < 0.035) Shadow = 0.0;
|
||||
if (calcthreshold < (depthCheck ? 1.0 : 0.035)) SSS = i/steps;
|
||||
}
|
||||
}
|
||||
|
||||
return vec2(Shadow, SSS);
|
||||
}
|
||||
|
||||
@ -641,7 +632,7 @@ float CustomPhase(float LightPos){
|
||||
return Final;
|
||||
}
|
||||
|
||||
vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, float lightPos, float shadows){
|
||||
vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, float lightPos, float shadows, bool distantSSS){
|
||||
|
||||
Scattering *= sss_density_multiplier;
|
||||
|
||||
@ -650,6 +641,8 @@ vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, floa
|
||||
float scatterDepth = max(1.0 - Scattering/density,0.0);
|
||||
scatterDepth = exp((1.0-scatterDepth) * -7.0);
|
||||
|
||||
if(distantSSS) scatterDepth = exp(Scattering * -10.0);
|
||||
|
||||
// this is for SSS when there is no shadow blocker depth
|
||||
#if defined BASIC_SHADOW_FILTER && defined Variable_Penumbra_Shadows
|
||||
scatterDepth = max(scatterDepth, pow(shadows, 0.5 + (1.0-Density) * 2.0) );
|
||||
@ -657,7 +650,6 @@ vec3 SubsurfaceScattering_sun(vec3 albedo, float Scattering, float Density, floa
|
||||
scatterDepth = exp(-7.0 * pow(1.0-shadows,3.0))*min(2.0-sss_density_multiplier,1.0);
|
||||
#endif
|
||||
|
||||
|
||||
// PBR at its finest :clueless:
|
||||
vec3 absorbColor = exp(max(luma(albedo) - albedo*vec3(1.0,1.1,1.2), 0.0) * -(20.0 - 19*scatterDepth) * sss_absorbance_multiplier);
|
||||
|
||||
@ -855,21 +847,14 @@ void main() {
|
||||
vec3 filteredShadow = vec3(1.412,1.0,0.0);
|
||||
vec2 SSAO_SSS = vec2(1.0);
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
#if defined DISTANT_HORIZONS && defined DH_AMBIENT_OCCLUSION
|
||||
BilateralUpscale_REUSE_Z(colortex3, colortex14, colortex12, gl_FragCoord.xy, DH_mixedLinearZ, SSAO_SSS, filteredShadow, hand);
|
||||
#else
|
||||
BilateralUpscale_REUSE_Z(colortex3, colortex14, depthtex0, gl_FragCoord.xy, ld(z0), SSAO_SSS, filteredShadow, hand);
|
||||
#endif
|
||||
|
||||
// SSAO_SSS = texture2D(colortex14,texcoord).xy;
|
||||
// filteredShadow = texture2D(colortex3,texcoord).xyz;
|
||||
// filteredShadow.rgb = vec3(filteredShadow.x, temporallyReprojectedData.gb);
|
||||
// SSAO_SSS.x = temporallyReprojectedData.a;
|
||||
|
||||
float ShadowBlockerDepth = filteredShadow.y;
|
||||
// Shadows = vec3(clamp(1.0-filteredShadow.b,0.0,1.0));
|
||||
// shadowMap = vec3(Shadows);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// START DRAW ////////////////////////////////////////
|
||||
@ -881,7 +866,7 @@ void main() {
|
||||
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 0
|
||||
// vec3 orbitstar = vec3(feetPlayerPos_normalized.x,abs(feetPlayerPos_normalized.y),feetPlayerPos_normalized.z); orbitstar.x -= WsunVec.x*0.2;
|
||||
|
||||
vec3 orbitstar = normalize(mat3(gbufferModelViewInverse) * toScreenSpace(vec3(texcoord,1.0)));
|
||||
vec3 orbitstar = normalize(mat3(gbufferModelViewInverse) * toScreenSpace(vec3(texcoord/RENDER_SCALE,1.0)));
|
||||
float radiance = 2.39996 - (worldTime + worldDay*24000.0) / 24000.0;
|
||||
// float radiance = 2.39996 + frameTimeCounter;
|
||||
mat2 rotationMatrix = mat2(vec2(cos(radiance), -sin(radiance)), vec2(sin(radiance), cos(radiance)));
|
||||
@ -905,7 +890,7 @@ void main() {
|
||||
|
||||
Background *= 1.0 - exp2(-50.0 * pow(clamp(feetPlayerPos_normalized.y+0.025,0.0,1.0),2.0) ); // darken the ground in the sky.
|
||||
|
||||
vec3 Sky = skyFromTex(feetPlayerPos_normalized, colortex4)/30.0;
|
||||
vec3 Sky = skyFromTex(feetPlayerPos_normalized, colortex4)/30.0 * Sky_Brightness;
|
||||
Background += Sky;
|
||||
|
||||
#if defined VOLUMETRIC_CLOUDS && !defined CLOUDS_INTERSECT_TERRAIN
|
||||
@ -1002,12 +987,9 @@ void main() {
|
||||
|
||||
float depthfalloff = 1.0 - clamp(exp(-0.1*estimatedDepth),0.0,1.0);
|
||||
|
||||
|
||||
float estimatedSunDepth = Vdiff; //assuming water plane
|
||||
Absorbtion = mix(exp(-2.0 * totEpsilon * estimatedDepth), exp(-8.0 * totEpsilon), depthfalloff);
|
||||
|
||||
// DirectLightColor *= Absorbtion;
|
||||
|
||||
// apply caustics to the lighting, and make sure they dont look weird
|
||||
DirectLightColor *= mix(1.0, waterCaustics(feetPlayerPos + cameraPosition, WsunVec)*WATER_CAUSTICS_BRIGHTNESS + 0.25, clamp(estimatedDepth,0,1));
|
||||
}
|
||||
@ -1039,9 +1021,9 @@ void main() {
|
||||
vec3 ambientcoefs = slopednormal / allDirections;
|
||||
float SkylightDir = ambientcoefs.y*1.5;
|
||||
|
||||
if(isGrass) SkylightDir = 1.25;
|
||||
if(isGrass) SkylightDir = 1.5;
|
||||
|
||||
float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.2 + (1-lightmap.y)*0.8) ;
|
||||
float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.2 + (1-lightmap.y)*0.8*0) ;
|
||||
|
||||
#if indirect_effect == 1
|
||||
skylight = min(skylight, mix(0.95, 2.5, pow(1-pow(1-SSAO_SSS.x, 0.5),2.0) ));
|
||||
@ -1082,6 +1064,9 @@ void main() {
|
||||
const vec3 lpvPos = vec3(0.0);
|
||||
#endif
|
||||
|
||||
// little highlight effect just to make caves look a little less flat.
|
||||
MinimumLightColor = MinimumLightColor + MinimumLightColor*dot(feetPlayerPos_normalized, slopednormal)*0.7;
|
||||
|
||||
Indirect_lighting = DoAmbientLightColor(feetPlayerPos, lpvPos, Indirect_lighting, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B) , lightmap.xy, exposure);
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
@ -1181,9 +1166,11 @@ void main() {
|
||||
|
||||
// combine shadowmap blocker depth with a minumum determined by the screenspace shadows, starting after the shadowmap ends
|
||||
ShadowBlockerDepth = mix(SS_directLight.g, ShadowBlockerDepth, shadowMapFalloff2);
|
||||
// ShadowBlockerDepth = SS_directLight.g;
|
||||
#endif
|
||||
|
||||
Direct_SSS = SubsurfaceScattering_sun(albedo, ShadowBlockerDepth, sunSSS_density, clamp(dot(feetPlayerPos_normalized, WsunVec),0.0,1.0), SSS_shadow);
|
||||
|
||||
Direct_SSS = SubsurfaceScattering_sun(albedo, ShadowBlockerDepth, sunSSS_density, clamp(dot(feetPlayerPos_normalized, WsunVec),0.0,1.0), SSS_shadow, shadowMapFalloff2 < 1.0);
|
||||
Direct_SSS *= mix(LM_shadowMapFallback, 1.0, shadowMapFalloff2);
|
||||
if (isEyeInWater == 0) Direct_SSS *= lightLeakFix;
|
||||
|
||||
@ -1211,6 +1198,7 @@ void main() {
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
Direct_lighting = max(DirectLightColor * NdotL * Shadows, DirectLightColor * Direct_SSS);
|
||||
// Direct_lighting = 0.5 + DirectLightColor * exp(-7*SS_directLight.g);
|
||||
#endif
|
||||
|
||||
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * albedo;
|
||||
@ -1239,7 +1227,7 @@ void main() {
|
||||
}
|
||||
|
||||
#if defined VOLUMETRIC_CLOUDS && defined CLOUDS_INTERSECT_TERRAIN
|
||||
vec4 Clouds = texture2D_bicubic_offset(colortex0, texcoord*CLOUDS_QUALITY, noise, RENDER_SCALE.x);
|
||||
vec4 Clouds = texture2D_bicubic_offset(colortex0, ((gl_FragCoord.xy + 0.5)*texelSize)*CLOUDS_QUALITY, noise, RENDER_SCALE.x);
|
||||
// vec4 Clouds = BilateralUpscale_REUSE_Z_clouds(colortex0, colortex12, DH_mixedLinearZ, gl_FragCoord.xy*CLOUDS_QUALITY, texcoord*CLOUDS_QUALITY);
|
||||
|
||||
gl_FragData[1] = texture2D(colortex2, texcoord);
|
||||
@ -1279,6 +1267,9 @@ void main() {
|
||||
if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * (1.0 - SSAO_SSS.x);
|
||||
// if(hideGUI == 0) gl_FragData[0].rgb = vec3(1) * filteredShadow.z;//exp(-7*(1-clamp(1.0 - filteredShadow.x,0.0,1.0)));
|
||||
#endif
|
||||
|
||||
// gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex1, texcoord).r);
|
||||
// if(texcoord.x > 0.5 )gl_FragData[0].rgb = vec3(1) * ld(texture2D(depthtex0, texcoord).r);
|
||||
|
||||
/* DRAWBUFFERS:3 */
|
||||
}
|
@ -65,8 +65,8 @@ void main() {
|
||||
exposure = texelFetch2D(colortex4,ivec2(10,37),0).r;
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
#endif
|
||||
|
||||
#ifdef TAA
|
||||
|
158
shaders/dimensions/composite12.fsh
Normal file
158
shaders/dimensions/composite12.fsh
Normal file
@ -0,0 +1,158 @@
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
varying vec2 texcoord;
|
||||
|
||||
uniform sampler2D colortex7;
|
||||
uniform sampler2D colortex14;
|
||||
uniform sampler2D depthtex0;
|
||||
uniform vec2 texelSize;
|
||||
uniform float frameTimeCounter;
|
||||
uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform float aspectRatio;
|
||||
|
||||
uniform sampler2D shadow;
|
||||
uniform sampler2D shadowcolor0;
|
||||
uniform sampler2D shadowcolor1;
|
||||
uniform sampler2D shadowtex0;
|
||||
uniform sampler2D shadowtex1;
|
||||
uniform sampler2D noisetex;
|
||||
|
||||
uniform vec3 previousCameraPosition;
|
||||
uniform vec3 cameraPosition;
|
||||
|
||||
#include "/lib/color_transforms.glsl"
|
||||
#include "/lib/color_dither.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
|
||||
uniform int hideGUI;
|
||||
|
||||
vec4 SampleTextureCatmullRom(sampler2D tex, vec2 uv, vec2 texSize )
|
||||
{
|
||||
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding
|
||||
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at
|
||||
// location [1, 1] in the grid, where [0, 0] is the top left corner.
|
||||
vec2 samplePos = uv * texSize;
|
||||
vec2 texPos1 = floor(samplePos - 0.5) + 0.5;
|
||||
|
||||
// Compute the fractional offset from our starting texel to our original sample location, which we'll
|
||||
// feed into the Catmull-Rom spline function to get our filter weights.
|
||||
vec2 f = samplePos - texPos1;
|
||||
|
||||
// Compute the Catmull-Rom weights using the fractional offset that we calculated earlier.
|
||||
// These equations are pre-expanded based on our knowledge of where the texels will be located,
|
||||
// which lets us avoid having to evaluate a piece-wise function.
|
||||
vec2 w0 = f * ( -0.5 + f * (1.0 - 0.5*f));
|
||||
vec2 w1 = 1.0 + f * f * (-2.5 + 1.5*f);
|
||||
vec2 w2 = f * ( 0.5 + f * (2.0 - 1.5*f) );
|
||||
vec2 w3 = f * f * (-0.5 + 0.5 * f);
|
||||
|
||||
// Work out weighting factors and sampling offsets that will let us use bilinear filtering to
|
||||
// simultaneously evaluate the middle 2 samples from the 4x4 grid.
|
||||
vec2 w12 = w1 + w2;
|
||||
vec2 offset12 = w2 / (w1 + w2);
|
||||
|
||||
// Compute the final UV coordinates we'll use for sampling the texture
|
||||
vec2 texPos0 = texPos1 - vec2(1.0);
|
||||
vec2 texPos3 = texPos1 + vec2(2.0);
|
||||
vec2 texPos12 = texPos1 + offset12;
|
||||
|
||||
texPos0 *= texelSize;
|
||||
texPos3 *= texelSize;
|
||||
texPos12 *= texelSize;
|
||||
|
||||
vec4 result = vec4(0.0);
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos0.y)) * w0.x * w0.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos0.y)) * w12.x * w0.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos0.y)) * w3.x * w0.y;
|
||||
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos12.y)) * w0.x * w12.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos12.y)) * w12.x * w12.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos12.y)) * w3.x * w12.y;
|
||||
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos3.y)) * w0.x * w3.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos3.y)) * w12.x * w3.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos3.y)) * w3.x * w3.y;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// thanks stackoverflow https://stackoverflow.com/questions/944713/help-with-pixel-shader-effect-for-brightness-and-contrast#3027595
|
||||
void applyContrast(inout vec3 color, float contrast){
|
||||
color = (color - 0.5) * contrast + 0.5;
|
||||
}
|
||||
|
||||
float lowerCurve(float x) {
|
||||
float y = 16 * x * (0.5 - x) * 0.1;
|
||||
return clamp(y, 0.0, 1.0);
|
||||
}
|
||||
float upperCurve(float x) {
|
||||
float y = 16 * (0.5 - x) * (x - 1.0) * 0.1;
|
||||
return clamp(y, 0.0, 1.0);
|
||||
}
|
||||
vec3 toneCurve(vec3 color){
|
||||
color.r += LOWER_CURVE * lowerCurve(color.r) + UPPER_CURVE * upperCurve(color.r);
|
||||
color.g += LOWER_CURVE * lowerCurve(color.g) + UPPER_CURVE * upperCurve(color.g);
|
||||
color.b += LOWER_CURVE * lowerCurve(color.b) + UPPER_CURVE * upperCurve(color.b);
|
||||
return color;
|
||||
}
|
||||
|
||||
vec3 colorGrading(vec3 color) {
|
||||
float grade_luma = dot(color, vec3(1.0 / 3.0));
|
||||
float shadows_amount = saturate(-6.0 * grade_luma + 2.75);
|
||||
float mids_amount = saturate(-abs(6.0 * grade_luma - 3.0) + 1.25);
|
||||
float highlights_amount = saturate(6.0 * grade_luma - 3.25);
|
||||
|
||||
vec3 graded_shadows = color * SHADOWS_TARGET * SHADOWS_GRADE_MUL * 1.7320508076;
|
||||
vec3 graded_mids = color * MIDS_TARGET * MIDS_GRADE_MUL * 1.7320508076;
|
||||
vec3 graded_highlights = color * HIGHLIGHTS_TARGET * HIGHLIGHTS_GRADE_MUL * 1.7320508076;
|
||||
|
||||
return saturate(graded_shadows * shadows_amount + graded_mids * mids_amount + graded_highlights * highlights_amount);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
||||
/* DRAWBUFFERS:7 */
|
||||
|
||||
#ifdef BICUBIC_UPSCALING
|
||||
vec3 col = SampleTextureCatmullRom(colortex7,texcoord,1.0/texelSize).rgb;
|
||||
#else
|
||||
vec3 col = texture2D(colortex7,texcoord).rgb;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONTRAST_ADAPTATIVE_SHARPENING
|
||||
//Weights : 1 in the center, 0.5 middle, 0.25 corners
|
||||
vec3 albedoCurrent1 = texture2D(colortex7, texcoord + vec2(texelSize.x,texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent2 = texture2D(colortex7, texcoord + vec2(texelSize.x,-texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent3 = texture2D(colortex7, texcoord + vec2(-texelSize.x,-texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent4 = texture2D(colortex7, texcoord + vec2(-texelSize.x,texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
|
||||
vec3 m1 = -0.5/3.5*col + albedoCurrent1/3.5 + albedoCurrent2/3.5 + albedoCurrent3/3.5 + albedoCurrent4/3.5;
|
||||
vec3 std = abs(col - m1) + abs(albedoCurrent1 - m1) + abs(albedoCurrent2 - m1) +
|
||||
|
||||
abs(albedoCurrent3 - m1) + abs(albedoCurrent3 - m1) + abs(albedoCurrent4 - m1);
|
||||
|
||||
float contrast = 1.0 - luma(std)/5.0;
|
||||
col = col*(1.0+(SHARPENING+UPSCALING_SHARPNENING)*contrast)
|
||||
- (SHARPENING+UPSCALING_SHARPNENING)/(1.0-0.5/3.5)*contrast*(m1 - 0.5/3.5*col);
|
||||
#endif
|
||||
|
||||
float lum = luma(col);
|
||||
vec3 diff = col-lum;
|
||||
col = col + diff*(-lum*CROSSTALK + SATURATION);
|
||||
|
||||
vec3 FINAL_COLOR = clamp(int8Dither(col,texcoord),0.0,1.0);
|
||||
|
||||
#ifdef TONE_CURVE
|
||||
FINAL_COLOR = toneCurve(FINAL_COLOR);
|
||||
#endif
|
||||
|
||||
#ifdef COLOR_GRADING_ENABLED
|
||||
FINAL_COLOR = colorGrading(FINAL_COLOR);
|
||||
#endif
|
||||
|
||||
applyContrast(FINAL_COLOR, CONTRAST); // for fun
|
||||
|
||||
gl_FragData[0].rgb = FINAL_COLOR;
|
||||
}
|
15
shaders/dimensions/composite12.vsh
Normal file
15
shaders/dimensions/composite12.vsh
Normal file
@ -0,0 +1,15 @@
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
varying vec2 texcoord;
|
||||
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
gl_Position = ftransform();
|
||||
texcoord = gl_MultiTexCoord0.xy;
|
||||
}
|
@ -38,6 +38,7 @@ uniform int isEyeInWater;
|
||||
uniform float rainStrength;
|
||||
uniform ivec2 eyeBrightnessSmooth;
|
||||
uniform float eyeAltitude;
|
||||
uniform float caveDetection;
|
||||
|
||||
#define DHVLFOG
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
@ -397,7 +398,7 @@ void main() {
|
||||
vec3 indirectLightColor_dynamic = averageSkyCol_Clouds/30.0;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
vec4 VolumetricFog = GetVolumetricFog(viewPos0, vec2(noise_1,noise_2), directLightColor, indirectLightColor);
|
||||
vec4 VolumetricFog = GetVolumetricFog(viewPos0, vec2(noise_1,noise_2), directLightColor, indirectLightColor, averageSkyCol_Clouds/30.0);
|
||||
#endif
|
||||
|
||||
#if defined NETHER_SHADER || defined END_SHADER
|
||||
|
@ -16,7 +16,6 @@ flat varying vec3 averageSkyCol_Clouds;
|
||||
flat varying vec3 WsunVec;
|
||||
flat varying vec3 refractedSunVec;
|
||||
|
||||
flat varying float tempOffsets;
|
||||
uniform vec2 texelSize;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
@ -44,11 +43,11 @@ void main() {
|
||||
// gl_Position.xy = (gl_Position.xy*0.5+0.5)*0.51*2.0-1.0;
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*(0.01+VL_RENDER_RESOLUTION)*2.0-1.0;
|
||||
|
||||
#ifdef TAA
|
||||
tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
#else
|
||||
tempOffsets = 0.0;
|
||||
#endif
|
||||
// #ifdef TAA
|
||||
// tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
// #else
|
||||
// tempOffsets = 0.0;
|
||||
// #endif
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
@ -56,11 +55,11 @@ void main() {
|
||||
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
|
||||
dailyWeatherParams0.a = texelFetch2D(colortex4,ivec2(3,1),0).x/150.0;
|
||||
dailyWeatherParams1.a = texelFetch2D(colortex4,ivec2(3,1),0).y/150.0;
|
||||
dailyWeatherParams0.a = (texelFetch2D(colortex4,ivec2(3,1),0).x/150.0)/2.0;
|
||||
dailyWeatherParams1.a = (texelFetch2D(colortex4,ivec2(3,1),0).y/150.0)/2.0;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,7 +3,11 @@
|
||||
flat varying vec3 zMults;
|
||||
|
||||
flat varying vec2 TAA_Offset;
|
||||
flat varying vec3 skyGroundColor;
|
||||
flat varying vec3 WsunVec;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
flat varying vec3 skyGroundColor;
|
||||
#endif
|
||||
|
||||
uniform sampler2D noisetex;
|
||||
uniform sampler2D depthtex0;
|
||||
@ -32,8 +36,6 @@ uniform vec2 texelSize;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
|
||||
flat varying vec4 lightCol; //main light source color (rgb),used light source(1=sun,-1=moon)
|
||||
flat varying vec3 WsunVec;
|
||||
|
||||
uniform vec3 sunVec;
|
||||
uniform float frameTimeCounter;
|
||||
@ -60,7 +62,7 @@ uniform float rainStrength;
|
||||
uniform float blindness;
|
||||
uniform float darknessFactor;
|
||||
uniform float darknessLightFactor;
|
||||
|
||||
uniform float caveDetection;
|
||||
|
||||
#include "/lib/waterBump.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
@ -250,18 +252,23 @@ void main() {
|
||||
vec3 fragpos = toScreenSpace_DH(texcoord/RENDER_SCALE-vec2(TAA_Offset)*texelSize*0.5, z, DH_depth0);
|
||||
|
||||
// vec3 fragpos = toScreenSpace(vec3(texcoord/RENDER_SCALE-vec2(TAA_Offset)*texelSize*0.5,z));
|
||||
vec3 p3 = mat3(gbufferModelViewInverse) * fragpos;
|
||||
vec3 p3 = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz;
|
||||
vec3 np3 = normVec(p3);
|
||||
|
||||
float linearDistance = length(p3);
|
||||
float linearDistance_cylinder = length(p3.xz);
|
||||
|
||||
// vec3 fragpos_NODH = toScreenSpace(texcoord/RENDER_SCALE-vec2(TAA_Offset)*texelSize*0.5, z);
|
||||
|
||||
// float linearDistance_NODH = length(p3);
|
||||
|
||||
|
||||
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||
float lightleakfixfast = clamp(eyeBrightness.y/240.,0.0,1.0);
|
||||
|
||||
////// --------------- UNPACK TRANSLUCENT GBUFFERS --------------- //////
|
||||
vec4 data = texture2D(colortex11,texcoord).rgba;
|
||||
vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g)) ;
|
||||
vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g)) ;
|
||||
vec4 unpack1 = vec4(decodeVec2(data.b),0,0) ;
|
||||
|
||||
vec4 albedo = vec4(unpack0.ba,unpack1.rg);
|
||||
@ -282,7 +289,6 @@ void main() {
|
||||
bool isReflective = abs(translucentMasks - 0.7) < 0.01 || isWater || isReflectiveEntity;
|
||||
bool isEntity = abs(translucentMasks - 0.9) < 0.01 || isReflectiveEntity;
|
||||
|
||||
|
||||
////// --------------- get volumetrics
|
||||
#ifdef TOGGLE_VL_FOG
|
||||
#ifdef DISTANT_HORIZONS
|
||||
@ -307,7 +313,7 @@ void main() {
|
||||
vec3 color = texture2D(colortex3, refractedCoord).rgb;
|
||||
|
||||
// apply block breaking effect.
|
||||
if(albedo.a > 0.01 && !isWater && TranslucentShader.a <= 0.0) color = mix(color*6.0, color, luma(albedo.rgb)) * albedo.rgb;
|
||||
if(albedo.a > 0.01 && !isWater && TranslucentShader.a <= 0.0 && !isEntity) color = mix(color*6.0, color, luma(albedo.rgb)) * albedo.rgb;
|
||||
|
||||
////// --------------- BLEND TRANSLUCENT GBUFFERS
|
||||
//////////// and do border fog on opaque and translucents
|
||||
@ -323,7 +329,7 @@ void main() {
|
||||
|
||||
if(swappedDepth >= 1.0 || isEyeInWater != 0) fog = 0.0;
|
||||
|
||||
if(lightleakfixfast < 1.0) fog *= lightleakfix;
|
||||
// fog *= lightleakfix;
|
||||
|
||||
#ifdef SKY_GROUND
|
||||
vec3 borderFogColor = skyGroundColor;
|
||||
@ -352,21 +358,21 @@ void main() {
|
||||
//////////// blindness, nightvision, liquid fogs and misc fogs
|
||||
|
||||
#if defined OVERWORLD_SHADER && defined CAVE_FOG
|
||||
if (isEyeInWater == 0 && eyeAltitude < 1500 && lightleakfix < 1.0){
|
||||
if (isEyeInWater == 0 && eyeAltitude < 1500){
|
||||
|
||||
float cavefog = clamp( pow(linearDistance / far, CaveFogFallOff) ,0.0,1.0);
|
||||
cavefog = cavefog*0.95 + clamp( pow(1.0 - exp((linearDistance / far) * -5), 2.0) ,0.0,1.0)*0.05;
|
||||
float cavefog = pow(1.0 - max(1.0 - linearDistance/far,0.0),2.0);
|
||||
|
||||
vec3 cavefogCol = vec3(CaveFogColor_R, CaveFogColor_G, CaveFogColor_B) * cavefog;
|
||||
|
||||
cavefog *= exp(-30.0*(pow(clamp(np3.y-0.5,0.0,1.0),2.0))); // create a hole in the fog above, so the sky is a little visible.
|
||||
|
||||
vec3 cavefogCol = vec3(CaveFogColor_R, CaveFogColor_G, CaveFogColor_B);
|
||||
cavefogCol *= clamp( exp(clamp(np3.y * 0.5 + 0.5,0,1) * -3.0) ,0.0,1.0); // apply a vertical gradient to the fog color
|
||||
cavefogCol *= exp(-7.0*clamp(normalize(np3).y*0.5+0.5,0.0,1.0)) * 0.999 + 0.001;
|
||||
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
BiomeFogColor(cavefogCol);
|
||||
#endif
|
||||
|
||||
color.rgb = mix(color.rgb, cavefogCol, cavefog * (1.0-lightleakfix));
|
||||
float skyhole = pow(clamp(1.0-pow(max(np3.y - 0.6,0.0)*5.0,2.0),0.0,1.0),2);
|
||||
|
||||
color.rgb = mix(color.rgb + cavefogCol * caveDetection, cavefogCol, swappedDepth >= 1.0 ? skyhole * caveDetection : 0.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -408,9 +414,12 @@ void main() {
|
||||
|
||||
////// --------------- BLEND FOG INTO SCENE
|
||||
//////////// apply VL fog over opaque and translucents
|
||||
|
||||
// color += skyGroundColor * (1.0 - pow(max(1.0 - linearDistance/far,0.0),3.0)) * rainStrength;
|
||||
|
||||
color *= vl.a;
|
||||
color += vl.rgb;
|
||||
bloomyFogMult *= vl.a;
|
||||
bloomyFogMult *= mix(vl.a,vl.a*0.5 + 0.5, rainStrength);
|
||||
|
||||
////// --------------- VARIOUS FOG EFFECTS (in front of volumetric fog)
|
||||
//////////// blindness, nightvision, liquid fogs and misc fogs
|
||||
@ -448,12 +457,11 @@ void main() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
gl_FragData[0].r = bloomyFogMult; // pass fog alpha so bloom can do bloomy fog
|
||||
gl_FragData[1].rgb = clamp(color.rgb, 0.0,68000.0);
|
||||
|
||||
// gl_FragData[1].rgb = vec3(tangentNormals.xy,0.0) ;
|
||||
// gl_FragData[1].rgb = vec3(1.0) * ld( (data.a > 0.0 ? data.a : texture2D(depthtex0, texcoord).x ) ) ;
|
||||
// gl_FragData[1].rgb = vec3(tangentNormals.xy,0.0) ;
|
||||
// gl_FragData[1].rgb = vec3(1.0) * ld( (data.a > 0.0 ? data.a : texture2D(depthtex0, texcoord).x ) ) ;
|
||||
// gl_FragData[1].rgb = gl_FragData[1].rgb * (1.0-TranslucentShader.a) + TranslucentShader.rgb*10.0;
|
||||
// gl_FragData[1].rgb = 1-(texcoord.x > 0.5 ? vec3(TranslucentShader.a) : vec3(data.a));
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
|
||||
varying vec2 texcoord;
|
||||
flat varying vec3 zMults;
|
||||
|
||||
#ifdef BorderFog
|
||||
uniform sampler2D colortex4;
|
||||
flat varying vec3 skyGroundColor;
|
||||
#endif
|
||||
|
||||
flat varying vec3 WsunVec;
|
||||
|
||||
uniform float far;
|
||||
@ -24,11 +30,9 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(7.,-7.)/8.);
|
||||
|
||||
|
||||
#ifdef BorderFog
|
||||
uniform sampler2D colortex4;
|
||||
flat varying vec3 skyGroundColor;
|
||||
#endif
|
||||
#ifdef OVERWORLD_SHADER
|
||||
|
||||
#endif
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -37,8 +41,11 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
|
||||
void main() {
|
||||
|
||||
#ifdef BorderFog
|
||||
skyGroundColor = texelFetch2D(colortex4,ivec2(1,37),0).rgb / 30.0;
|
||||
#ifdef OVERWORLD_SHADER
|
||||
#ifdef BorderFog
|
||||
skyGroundColor = texelFetch2D(colortex4,ivec2(1,37),0).rgb / 30.0 * Sky_Brightness;
|
||||
#endif
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||
#endif
|
||||
|
||||
#ifdef TAA
|
||||
@ -46,13 +53,8 @@ void main() {
|
||||
#else
|
||||
TAA_Offset = vec2(0.0);
|
||||
#endif
|
||||
|
||||
float lightCola = float(sunElevation > 1e-5)*2.0 - 1.0;
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||
|
||||
zMults = vec3(1.0/(far * near),far+near,far-near);
|
||||
|
||||
gl_Position = ftransform();
|
||||
texcoord = gl_MultiTexCoord0.xy;
|
||||
|
||||
}
|
||||
|
@ -403,10 +403,6 @@ vec4 TAA_hq(bool hand){
|
||||
float isclamped = distance(albedoPrev,finalcAcc)/luma(albedoPrev) * 0.5;
|
||||
float movementRejection = (0.12+isclamped)*clamp(length(velocity/texelSize),0.0,1.0);
|
||||
|
||||
|
||||
// float depthDiff = texture2D(colortex14, previousPosition.xy).a;
|
||||
// movementRejection = mix( 0.0, 1.0, depthDiff);
|
||||
|
||||
if(hand) movementRejection *= 5.0;
|
||||
|
||||
//Blend current pixel with clamped history, apply fast tonemap beforehand to reduce flickering
|
||||
@ -442,13 +438,16 @@ void main() {
|
||||
gl_FragData[0].a = 1.0;
|
||||
|
||||
#ifdef TAA
|
||||
float dataUnpacked = decodeVec2(texture2D(colortex1,texcoord).w).y;
|
||||
bool hand = abs(dataUnpacked-0.75) < 0.01 && texture2D(depthtex1,texcoord).x < 1.0;
|
||||
|
||||
vec2 taauTC = clamp(texcoord*RENDER_SCALE, vec2(0.0), RENDER_SCALE - texelSize*2.0);
|
||||
|
||||
float dataUnpacked = decodeVec2(texture2D(colortex1,taauTC).w).y;
|
||||
bool hand = abs(dataUnpacked-0.75) < 0.01 && texture2D(depthtex1,taauTC).x < 1.0;
|
||||
|
||||
vec4 color = TAA_hq(hand);
|
||||
|
||||
#if DEBUG_VIEW == debug_TEMPORAL_REPROJECTION
|
||||
color.rgb = texture2D(colortex3, texcoord).rgb;
|
||||
color.rgb = texture2D(colortex3, taauTC).rgb;
|
||||
#endif
|
||||
|
||||
#ifdef SCREENSHOT_MODE
|
||||
@ -457,7 +456,7 @@ void main() {
|
||||
gl_FragData[0] = clamp(fp10Dither(color, triangularize(interleaved_gradientNoise())), 0.0, 65000.0);
|
||||
#endif
|
||||
#else
|
||||
vec3 color = clamp(fp10Dither(vec4(texture2D(colortex3,texcoord).rgb,1.0), triangularize(interleaved_gradientNoise())).rgb,0.0,65000.);
|
||||
vec3 color = clamp(fp10Dither(vec4(texture2D(colortex3,taauTC).rgb,1.0), triangularize(interleaved_gradientNoise())).rgb,0.0,65000.);
|
||||
gl_FragData[0].rgb = color;
|
||||
#endif
|
||||
}
|
@ -44,6 +44,7 @@ uniform vec3 sunPosition;
|
||||
uniform vec3 cameraPosition;
|
||||
// uniform float far;
|
||||
uniform ivec2 eyeBrightnessSmooth;
|
||||
uniform float caveDetection;
|
||||
|
||||
|
||||
vec4 lightCol = vec4(lightSourceColor, float(sunElevation > 1e-5)*2-1.);
|
||||
@ -190,19 +191,15 @@ if (gl_FragCoord.x > pixelPos6.x && gl_FragCoord.x < pixelPos6.x + 1 && gl_FragC
|
||||
ivec2 pixelPos = ivec2(0,0);
|
||||
if (gl_FragCoord.x > 1 && gl_FragCoord.x < 4 && gl_FragCoord.y > 1 && gl_FragCoord.y < 2){
|
||||
|
||||
mixhistory = 0.01;
|
||||
mixhistory = 0.005;
|
||||
|
||||
if(gl_FragCoord.x < 2) gl_FragData[0] = vec4(dailyWeatherParams0.rgb,1.0);
|
||||
if(gl_FragCoord.x > 2) gl_FragData[0] = vec4(dailyWeatherParams1.rgb,1.0);
|
||||
if(gl_FragCoord.x > 3) gl_FragData[0] = vec4(dailyWeatherParams0.a, dailyWeatherParams1.a, 0.0, 1.0);
|
||||
if(gl_FragCoord.x < 2) gl_FragData[0] = vec4(dailyWeatherParams0.rgb * 2.0,1.0);
|
||||
if(gl_FragCoord.x > 2) gl_FragData[0] = vec4(dailyWeatherParams1.rgb * 2.0,1.0);
|
||||
if(gl_FragCoord.x > 3) gl_FragData[0] = vec4(dailyWeatherParams0.a * 2.0, dailyWeatherParams1.a * 2.0, 0.0, 1.0);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
/// --- STORE COLOR LUT --- ///
|
||||
///////////////////////////////
|
||||
@ -213,7 +210,6 @@ if (gl_FragCoord.x > pixelPos6.x && gl_FragCoord.x < pixelPos6.x + 1 && gl_FragC
|
||||
vec3 skyGroundCol = skyFromTex(vec3(0, -1 ,0), colortex4).rgb;// * clamp(WsunVec.y*2.0,0.2,1.0);
|
||||
|
||||
|
||||
|
||||
/// --- Save light values
|
||||
if (gl_FragCoord.x < 1. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||
gl_FragData[0] = vec4(averageSkyCol_Clouds * AmbientLightTint,1.0);
|
||||
@ -248,19 +244,16 @@ if (gl_FragCoord.x > pixelPos6.x && gl_FragCoord.x < pixelPos6.x + 1 && gl_FragC
|
||||
|
||||
/// --- Sky only
|
||||
if (gl_FragCoord.x > 18. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257){
|
||||
|
||||
|
||||
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.,1.))/256.+tempOffsets/256.,0.0,1.0);
|
||||
vec3 viewVector = cartToSphere(p);
|
||||
|
||||
vec2 planetSphere = vec2(0.0);
|
||||
vec3 sky = vec3(0.0);
|
||||
vec3 skyAbsorb = vec3(0.0);
|
||||
|
||||
// float GroundDarkening = (exp2(-15 * clamp(-viewVector.y,0.0,1.0)) * 0.7+0.3); // darken the ground in the sky.
|
||||
sky = calculateAtmosphere((averageSkyCol*4000./2.0) , viewVector, vec3(0.0,1.0,0.0), WsunVec, -WsunVec, planetSphere, skyAbsorb, 10, blueNoise());
|
||||
|
||||
// sky = mix(sky, (averageSkyCol + skyAbsorb)*4000./2.0, (1.0 - exp(pow(clamp(-viewVector.y+0.5,0.0,1.0),2) * -25)));
|
||||
|
||||
vec3 mC = vec3(fog_coefficientMieR*1e-6, fog_coefficientMieG*1e-6, fog_coefficientMieB*1e-6);
|
||||
|
||||
sky = calculateAtmosphere((averageSkyCol*4000./2.0), viewVector, vec3(0.0,1.0,0.0), WsunVec, -WsunVec, planetSphere, skyAbsorb, 10, blueNoise());
|
||||
|
||||
// fade atmosphere conditions for rain away when you pass above the cloud plane.
|
||||
float heightRelativeToClouds = clamp(1.0 - max(eyeAltitude - CloudLayer0_height,0.0) / 200.0 ,0.0,1.0);
|
||||
@ -270,7 +263,7 @@ if (gl_FragCoord.x > 18. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257){
|
||||
sky *= vec3(0.0, 0.18, 0.35);
|
||||
#endif
|
||||
|
||||
gl_FragData[0] = vec4(sky / 4000.0 * Sky_Brightness, 1.0);
|
||||
gl_FragData[0] = vec4(sky / 4000.0, 1.0);
|
||||
}
|
||||
|
||||
/// --- Sky + clouds + fog
|
||||
@ -278,7 +271,7 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
||||
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.+257,1.))/256.+tempOffsets/256.,0.0,1.0);
|
||||
vec3 viewVector = cartToSphere(p);
|
||||
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition) * ( float(sunElevation > 1e-5)*2.0-1.0 );
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition) ;// * ( float(sunElevation > 1e-5)*2.0-1.0 );
|
||||
|
||||
vec3 sky = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy)-ivec2(257,0),0).rgb/150.0;
|
||||
|
||||
@ -291,8 +284,8 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
||||
vec4 clouds = renderClouds(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), suncol*2.0, skyGroundCol/30.0);
|
||||
sky = sky*clouds.a + clouds.rgb / 5.0;
|
||||
|
||||
sky = mix(dot(sky,vec3(0.333)) * vec3(0.5), sky, pow(clamp(viewVector.y+1.0,0.0,1.0),5));
|
||||
vec4 VL_Fog = GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), suncol*1.75, skyGroundCol/30.0);
|
||||
sky = mix(dot(sky, vec3(0.333)) * vec3(0.5), sky, pow(clamp(viewVector.y+1.0,0.0,1.0),5));
|
||||
vec4 VL_Fog = GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), suncol*1.75, skyGroundCol/30.0, averageSkyCol_Clouds/30.0);
|
||||
|
||||
sky = sky * VL_Fog.a + VL_Fog.rgb / 5.0;
|
||||
|
||||
|
@ -143,14 +143,10 @@ void main() {
|
||||
averageSkyCol_Clouds += 1.5 * (skyCloudsFromTex(pos,colortex4).rgb/maxIT/150.0);
|
||||
averageSkyCol += 1.5 * (skyFromTex(pos,colortex4).rgb/maxIT/150.0);
|
||||
}
|
||||
|
||||
// only need to sample one spot for this
|
||||
// averageSkyCol_Clouds = max(averageSkyCol_Clouds * (1.0/(luma(averageSkyCol_Clouds)*0.25+0.75)), minimumlight);
|
||||
// averageSkyCol = max(averageSkyCol*PLANET_GROUND_BRIGHTNESS, minimumlight);
|
||||
|
||||
// maximum control of color and luminance
|
||||
vec3 minimumlight = vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.003 + nightVision);
|
||||
averageSkyCol_Clouds = max( normalize(averageSkyCol_Clouds) * min(luma(averageSkyCol_Clouds) * 3.0,2.5), minimumlight);
|
||||
vec3 minimumlight = vec3(0.5,0.75,1.0) * (MIN_LIGHT_AMOUNT*0.001 + nightVision);
|
||||
averageSkyCol_Clouds = max( normalize(averageSkyCol_Clouds) * min(luma(averageSkyCol_Clouds) * 3.0,2.5) * (1.0-rainStrength*0.3), minimumlight);
|
||||
averageSkyCol = max(averageSkyCol * PLANET_GROUND_BRIGHTNESS, minimumlight);
|
||||
|
||||
////////////////////////////////////////
|
||||
@ -181,7 +177,7 @@ void main() {
|
||||
// as the day counter changes, switch to a different set of stored values.
|
||||
|
||||
#ifdef CHOOSE_RANDOM_WEATHER_PROFILE
|
||||
int dayCounter = clamp(int(hash11(float(mod(worldDay, 1000))) * 11.0), 0,10);
|
||||
int dayCounter = int(clamp(hash11(float(mod(worldDay, 1000))) * 10.0, 0,10));
|
||||
#else
|
||||
int dayCounter = int(mod(worldDay, 10));
|
||||
#endif
|
||||
@ -217,6 +213,7 @@ void main() {
|
||||
|
||||
dailyWeatherParams0 = weatherParameters_A[dayCounter];
|
||||
dailyWeatherParams1 = weatherParameters_B[dayCounter];
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////
|
||||
|
@ -23,6 +23,7 @@ uniform sampler2D noisetex;
|
||||
uniform sampler2D colortex12;
|
||||
|
||||
flat varying vec3 WsunVec;
|
||||
uniform float sunElevation;
|
||||
uniform vec3 sunVec;
|
||||
uniform vec2 texelSize;
|
||||
uniform float frameTimeCounter;
|
||||
@ -124,17 +125,20 @@ void main() {
|
||||
/* DRAWBUFFERS:0 */
|
||||
#if defined OVERWORLD_SHADER && defined VOLUMETRIC_CLOUDS
|
||||
vec2 halfResTC = vec2(floor(gl_FragCoord.xy)/CLOUDS_QUALITY/RENDER_SCALE+0.5+offsets[framemod8]*CLOUDS_QUALITY*RENDER_SCALE*0.5);
|
||||
|
||||
float depth = texture2D(depthtex0, halfResTC*texelSize).x;
|
||||
|
||||
|
||||
// vec3 viewPos = toScreenSpace(vec3(halfResTC*texelSize, depth));
|
||||
vec2 halfResTC2 = vec2(floor(gl_FragCoord.xy)/CLOUDS_QUALITY+0.5+offsets[framemod8]*CLOUDS_QUALITY*0.5);
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float DH_depth = texture2D(dhDepthTex, halfResTC*texelSize).x;
|
||||
vec3 viewPos = toScreenSpace_DH(halfResTC*texelSize, depth, DH_depth);
|
||||
#ifdef CLOUDS_INTERSECT_TERRAIN
|
||||
float depth = texture2D(depthtex0, halfResTC2*texelSize).x;
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float DH_depth = texture2D(dhDepthTex, halfResTC2*texelSize).x;
|
||||
vec3 viewPos = toScreenSpace_DH(halfResTC*texelSize, depth, DH_depth);
|
||||
#else
|
||||
vec3 viewPos = toScreenSpace(vec3(halfResTC*texelSize, depth));
|
||||
#endif
|
||||
#else
|
||||
vec3 viewPos = toScreenSpace(vec3(halfResTC*texelSize, depth));
|
||||
vec3 viewPos = toScreenSpace(vec3(halfResTC*texelSize, 1.0));
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -31,8 +31,8 @@ void main() {
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*clamp(CLOUDS_QUALITY+0.01,0.0,1.0)*2.0-1.0;
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
#endif
|
||||
|
||||
averageSkyCol = texelFetch2D(colortex4,ivec2(1,37),0).rgb;
|
||||
@ -43,7 +43,7 @@ void main() {
|
||||
// moonColor = texelFetch2D(colortex4,ivec2(9,37),0).rgb;
|
||||
|
||||
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition) * (float(sunElevation > 1e-5)*2.0-1.0);
|
||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);// * (float(sunElevation > 1e-5)*2.0-1.0);
|
||||
// WsunVec = normalize(LightDir);
|
||||
|
||||
tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
|
@ -1,114 +1,24 @@
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
varying vec2 texcoord;
|
||||
|
||||
uniform sampler2D colortex7;
|
||||
uniform sampler2D colortex14;
|
||||
uniform sampler2D depthtex0;
|
||||
uniform sampler2D depthtex2;
|
||||
uniform sampler2D noisetex;
|
||||
|
||||
varying vec2 texcoord;
|
||||
uniform vec2 texelSize;
|
||||
uniform float frameTimeCounter;
|
||||
uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform float aspectRatio;
|
||||
|
||||
uniform sampler2D shadow;
|
||||
uniform sampler2D shadowcolor0;
|
||||
uniform sampler2D shadowcolor1;
|
||||
uniform sampler2D shadowtex0;
|
||||
uniform sampler2D shadowtex1;
|
||||
uniform sampler2D noisetex;
|
||||
|
||||
uniform vec3 previousCameraPosition;
|
||||
uniform vec3 cameraPosition;
|
||||
uniform int hideGUI;
|
||||
|
||||
#include "/lib/color_transforms.glsl"
|
||||
#include "/lib/color_dither.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
|
||||
uniform int hideGUI;
|
||||
|
||||
vec4 SampleTextureCatmullRom(sampler2D tex, vec2 uv, vec2 texSize )
|
||||
{
|
||||
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding
|
||||
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at
|
||||
// location [1, 1] in the grid, where [0, 0] is the top left corner.
|
||||
vec2 samplePos = uv * texSize;
|
||||
vec2 texPos1 = floor(samplePos - 0.5) + 0.5;
|
||||
|
||||
// Compute the fractional offset from our starting texel to our original sample location, which we'll
|
||||
// feed into the Catmull-Rom spline function to get our filter weights.
|
||||
vec2 f = samplePos - texPos1;
|
||||
|
||||
// Compute the Catmull-Rom weights using the fractional offset that we calculated earlier.
|
||||
// These equations are pre-expanded based on our knowledge of where the texels will be located,
|
||||
// which lets us avoid having to evaluate a piece-wise function.
|
||||
vec2 w0 = f * ( -0.5 + f * (1.0 - 0.5*f));
|
||||
vec2 w1 = 1.0 + f * f * (-2.5 + 1.5*f);
|
||||
vec2 w2 = f * ( 0.5 + f * (2.0 - 1.5*f) );
|
||||
vec2 w3 = f * f * (-0.5 + 0.5 * f);
|
||||
|
||||
// Work out weighting factors and sampling offsets that will let us use bilinear filtering to
|
||||
// simultaneously evaluate the middle 2 samples from the 4x4 grid.
|
||||
vec2 w12 = w1 + w2;
|
||||
vec2 offset12 = w2 / (w1 + w2);
|
||||
|
||||
// Compute the final UV coordinates we'll use for sampling the texture
|
||||
vec2 texPos0 = texPos1 - vec2(1.0);
|
||||
vec2 texPos3 = texPos1 + vec2(2.0);
|
||||
vec2 texPos12 = texPos1 + offset12;
|
||||
|
||||
texPos0 *= texelSize;
|
||||
texPos3 *= texelSize;
|
||||
texPos12 *= texelSize;
|
||||
|
||||
vec4 result = vec4(0.0);
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos0.y)) * w0.x * w0.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos0.y)) * w12.x * w0.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos0.y)) * w3.x * w0.y;
|
||||
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos12.y)) * w0.x * w12.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos12.y)) * w12.x * w12.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos12.y)) * w3.x * w12.y;
|
||||
|
||||
result += texture2D(tex, vec2(texPos0.x, texPos3.y)) * w0.x * w3.y;
|
||||
result += texture2D(tex, vec2(texPos12.x, texPos3.y)) * w12.x * w3.y;
|
||||
result += texture2D(tex, vec2(texPos3.x, texPos3.y)) * w3.x * w3.y;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// thanks stackoverflow https://stackoverflow.com/questions/944713/help-with-pixel-shader-effect-for-brightness-and-contrast#3027595
|
||||
void applyContrast(inout vec3 color, float contrast){
|
||||
color = (color - 0.5) * contrast + 0.5;
|
||||
}
|
||||
|
||||
float lowerCurve(float x) {
|
||||
float y = 16 * x * (0.5 - x) * 0.1;
|
||||
return clamp(y, 0.0, 1.0);
|
||||
}
|
||||
float upperCurve(float x) {
|
||||
float y = 16 * (0.5 - x) * (x - 1.0) * 0.1;
|
||||
return clamp(y, 0.0, 1.0);
|
||||
}
|
||||
vec3 toneCurve(vec3 color){
|
||||
color.r += LOWER_CURVE * lowerCurve(color.r) + UPPER_CURVE * upperCurve(color.r);
|
||||
color.g += LOWER_CURVE * lowerCurve(color.g) + UPPER_CURVE * upperCurve(color.g);
|
||||
color.b += LOWER_CURVE * lowerCurve(color.b) + UPPER_CURVE * upperCurve(color.b);
|
||||
return color;
|
||||
}
|
||||
|
||||
vec3 colorGrading(vec3 color) {
|
||||
float grade_luma = dot(color, vec3(1.0 / 3.0));
|
||||
float shadows_amount = saturate(-6.0 * grade_luma + 2.75);
|
||||
float mids_amount = saturate(-abs(6.0 * grade_luma - 3.0) + 1.25);
|
||||
float highlights_amount = saturate(6.0 * grade_luma - 3.25);
|
||||
|
||||
vec3 graded_shadows = color * SHADOWS_TARGET * SHADOWS_GRADE_MUL * 1.7320508076;
|
||||
vec3 graded_mids = color * MIDS_TARGET * MIDS_GRADE_MUL * 1.7320508076;
|
||||
vec3 graded_highlights = color * HIGHLIGHTS_TARGET * HIGHLIGHTS_GRADE_MUL * 1.7320508076;
|
||||
|
||||
return saturate(graded_shadows * shadows_amount + graded_mids * mids_amount + graded_highlights * highlights_amount);
|
||||
}
|
||||
|
||||
float interleaved_gradientNoise(){
|
||||
vec2 coord = gl_FragCoord.xy;
|
||||
@ -116,10 +26,8 @@ float interleaved_gradientNoise(){
|
||||
return noise;
|
||||
}
|
||||
|
||||
|
||||
#include "/lib/gameplay_effects.glsl"
|
||||
|
||||
|
||||
void doCameraGridLines(inout vec3 color, vec2 UV){
|
||||
|
||||
float lineThicknessY = 0.001;
|
||||
@ -137,62 +45,65 @@ void doCameraGridLines(inout vec3 color, vec2 UV){
|
||||
color = mix(color, vec3(1.0), gridLines);
|
||||
}
|
||||
|
||||
uniform vec3 previousCameraPosition;
|
||||
// uniform vec3 cameraPosition;
|
||||
uniform mat4 gbufferPreviousModelView;
|
||||
// uniform mat4 gbufferModelViewInverse;
|
||||
// uniform mat4 gbufferModelView;
|
||||
|
||||
#include "/lib/util.glsl"
|
||||
#include "/lib/projections.glsl"
|
||||
|
||||
vec3 doMotionBlur(vec2 texcoord, float depth, float noise){
|
||||
|
||||
float samples = 4.0;
|
||||
vec3 color = vec3(0.0);
|
||||
|
||||
float blurMult = 1.0;
|
||||
if(depth < 0.56) blurMult = 0.0;
|
||||
|
||||
vec3 viewPos = toScreenSpace(vec3(texcoord, depth));
|
||||
viewPos = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz + (cameraPosition - previousCameraPosition);
|
||||
|
||||
vec3 previousPosition = mat3(gbufferPreviousModelView) * viewPos + gbufferPreviousModelView[3].xyz;
|
||||
previousPosition = toClipSpace3(previousPosition);
|
||||
|
||||
vec2 velocity = texcoord - previousPosition.xy;
|
||||
|
||||
// thank you Capt Tatsu for letting me use these
|
||||
velocity = (velocity / (1.0 + length(velocity))) * 0.05 * blurMult * MOTION_BLUR_STRENGTH;
|
||||
texcoord = texcoord - velocity*(samples*0.5 + noise);
|
||||
vec2 screenEdges = 2.0/vec2(viewWidth, viewHeight);
|
||||
|
||||
for (int i = 0; i < int(samples); i++) {
|
||||
|
||||
texcoord += velocity;
|
||||
color += texture2D(colortex7, clamp(texcoord, screenEdges, 1.0-screenEdges)).rgb;
|
||||
|
||||
}
|
||||
// return vec3(texcoord,0.0);
|
||||
return color / samples;
|
||||
}
|
||||
|
||||
void main() {
|
||||
#ifdef BICUBIC_UPSCALING
|
||||
vec3 col = SampleTextureCatmullRom(colortex7,texcoord,1.0/texelSize).rgb;
|
||||
#else
|
||||
vec3 col = texture2D(colortex7,texcoord).rgb;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONTRAST_ADAPTATIVE_SHARPENING
|
||||
//Weights : 1 in the center, 0.5 middle, 0.25 corners
|
||||
vec3 albedoCurrent1 = texture2D(colortex7, texcoord + vec2(texelSize.x,texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent2 = texture2D(colortex7, texcoord + vec2(texelSize.x,-texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent3 = texture2D(colortex7, texcoord + vec2(-texelSize.x,-texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
vec3 albedoCurrent4 = texture2D(colortex7, texcoord + vec2(-texelSize.x,texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
|
||||
|
||||
vec3 m1 = -0.5/3.5*col + albedoCurrent1/3.5 + albedoCurrent2/3.5 + albedoCurrent3/3.5 + albedoCurrent4/3.5;
|
||||
vec3 std = abs(col - m1) + abs(albedoCurrent1 - m1) + abs(albedoCurrent2 - m1) +
|
||||
abs(albedoCurrent3 - m1) + abs(albedoCurrent3 - m1) + abs(albedoCurrent4 - m1);
|
||||
float contrast = 1.0 - luma(std)/5.0;
|
||||
col = col*(1.0+(SHARPENING+UPSCALING_SHARPNENING)*contrast)
|
||||
- (SHARPENING+UPSCALING_SHARPNENING)/(1.0-0.5/3.5)*contrast*(m1 - 0.5/3.5*col);
|
||||
#endif
|
||||
|
||||
float lum = luma(col);
|
||||
vec3 diff = col-lum;
|
||||
col = col + diff*(-lum*CROSSTALK + SATURATION);
|
||||
|
||||
|
||||
|
||||
vec3 FINAL_COLOR = clamp(int8Dither(col,texcoord),0.0,1.0);
|
||||
|
||||
#ifdef TONE_CURVE
|
||||
FINAL_COLOR = toneCurve(FINAL_COLOR);
|
||||
#endif
|
||||
|
||||
#ifdef COLOR_GRADING_ENABLED
|
||||
FINAL_COLOR = colorGrading(FINAL_COLOR);
|
||||
#endif
|
||||
|
||||
applyContrast(FINAL_COLOR, CONTRAST); // for fun
|
||||
|
||||
float depth = texture2D(depthtex0,texcoord*RENDER_SCALE).r;
|
||||
float noise = interleaved_gradientNoise();
|
||||
|
||||
#ifdef MOTION_BLUR
|
||||
vec3 COLOR = doMotionBlur(texcoord, depth, noise);
|
||||
#else
|
||||
vec3 COLOR = texture2D(colortex7,texcoord).rgb;
|
||||
#endif
|
||||
|
||||
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT || defined WATER_ON_CAMERA_EFFECT
|
||||
// for making the fun, more fun
|
||||
applyGameplayEffects(FINAL_COLOR, texcoord, interleaved_gradientNoise());
|
||||
applyGameplayEffects(COLOR, texcoord, noise);
|
||||
#endif
|
||||
|
||||
#ifdef CAMERA_GRIDLINES
|
||||
doCameraGridLines(FINAL_COLOR, texcoord);
|
||||
doCameraGridLines(COLOR, texcoord);
|
||||
#endif
|
||||
|
||||
gl_FragColor.rgb = FINAL_COLOR;
|
||||
|
||||
#if DEBUG_VIEW == debug_SHADOWMAP
|
||||
if(texcoord.x < 0.25 && texcoord.y < 0.5) gl_FragColor.rgb = texture2D(shadowcolor0, (texcoord * vec2(2.0, 1.0) * 2 - vec2(0.0, 0.0)) ).rgb;
|
||||
#endif
|
||||
gl_FragColor.rgb = COLOR;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ uniform int isEyeInWater;
|
||||
uniform float rainStrength;
|
||||
uniform ivec2 eyeBrightnessSmooth;
|
||||
uniform float eyeAltitude;
|
||||
uniform float caveDetection;
|
||||
|
||||
#define DHVLFOG
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
@ -366,7 +367,7 @@ void main() {
|
||||
|
||||
vec4 VolumetricFog2 = vec4(0,0,0,1);
|
||||
#ifdef OVERWORLD_SHADER
|
||||
if(!iswater) VolumetricFog2 = GetVolumetricFog(viewPos1, vec2(noise_1, noise_2), directLightColor, indirectLightColor);
|
||||
if(!iswater) VolumetricFog2 = GetVolumetricFog(viewPos1, vec2(noise_1, noise_2), directLightColor, indirectLightColor,indirectLightColor_dynamic);
|
||||
#endif
|
||||
|
||||
vec4 underwaterVlFog = vec4(0,0,0,1);
|
||||
|
@ -14,7 +14,7 @@ flat varying vec3 averageSkyCol_Clouds;
|
||||
flat varying vec3 WsunVec;
|
||||
flat varying vec3 refractedSunVec;
|
||||
|
||||
flat varying float tempOffsets;
|
||||
// flat varying float tempOffsets;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
flat varying float exposure;
|
||||
@ -44,11 +44,11 @@ void main() {
|
||||
// gl_Position.xy = (gl_Position.xy*0.5+0.5)*0.51*2.0-1.0;
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*(0.01+VL_RENDER_RESOLUTION)*2.0-1.0;
|
||||
|
||||
#ifdef TAA
|
||||
tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
#else
|
||||
tempOffsets = 0.0;
|
||||
#endif
|
||||
// #ifdef TAA
|
||||
// tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
// #else
|
||||
// tempOffsets = 0.0;
|
||||
// #endif
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
@ -56,11 +56,11 @@ void main() {
|
||||
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||
|
||||
#if defined Daily_Weather
|
||||
dailyWeatherParams0 = vec4(texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams1 = vec4(texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0, 0.0);
|
||||
dailyWeatherParams0 = vec4((texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0)/2.0, 0.0);
|
||||
dailyWeatherParams1 = vec4((texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0)/2.0, 0.0);
|
||||
|
||||
dailyWeatherParams0.a = texelFetch2D(colortex4,ivec2(3,1),0).x/150.0;
|
||||
dailyWeatherParams1.a = texelFetch2D(colortex4,ivec2(3,1),0).y/150.0;
|
||||
dailyWeatherParams0.a = (texelFetch2D(colortex4,ivec2(3,1),0).x/150.0)/2.0;
|
||||
dailyWeatherParams1.a = (texelFetch2D(colortex4,ivec2(3,1),0).y/150.0)/2.0;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@ entity.1602=minecraft:lightning_bolt weather2:lightning_bolt
|
||||
|
||||
## misc stuff
|
||||
|
||||
entity.1603=blaze
|
||||
entity.1603=blaze minecraft:entity_flame
|
||||
|
||||
entity.1604=ender_dragon wither
|
||||
|
||||
|
@ -14,7 +14,7 @@ option.sun_illuminance = Sun Illuminance
|
||||
option.moon_illuminance = Moon Illuminance
|
||||
option.MOONPHASE_BASED_MOONLIGHT = Moonphase brightness levels
|
||||
|
||||
option.RESOURCEPACK_SKY = RP Sky
|
||||
option.RESOURCEPACK_SKY = ResourcePack Sky
|
||||
value.RESOURCEPACK_SKY.0 = Do not use
|
||||
value.RESOURCEPACK_SKY.1 = Sky + Shader sun/moon
|
||||
value.RESOURCEPACK_SKY.2 = Full sky
|
||||
@ -92,7 +92,7 @@ screen.Direct_Light = Direct Light
|
||||
option.Max_Shadow_Filter_Radius = Maximum Shadow Filter Radius
|
||||
option.Max_Filter_Depth = Sun Size Factor
|
||||
|
||||
screen.LPV = FloodFill
|
||||
screen.LPV = FloodFill - §cIRIS REQUIRED§r
|
||||
option.LPV_ENABLED = Enabled
|
||||
option.LPV_SIZE = Size
|
||||
value.LPV_SIZE.6 = Small [64]
|
||||
@ -432,7 +432,7 @@ screen.Post_Processing = Post Processing
|
||||
option.HIGHLIGHTS_GRADE_MUL = Highlights Brightness
|
||||
|
||||
|
||||
screen.LabPBR = Lab PBR
|
||||
screen.Resource_Pack_Support = Resource Pack Support
|
||||
screen.Reflections = Specular Reflections
|
||||
option.Specular_Reflections = Specular Reflections
|
||||
option.Screen_Space_Reflections = Screen-Space Reflections
|
||||
@ -454,7 +454,6 @@ screen.LabPBR = Lab PBR
|
||||
|
||||
|
||||
screen.POM = Parallax Occlusion Mapping / POM
|
||||
option.HEIGTHMAP_DEPTH_OFFSET = Heightmap in Depth
|
||||
option.POM = Parallax Occlusion Mapping
|
||||
option.MAX_ITERATIONS = Quality
|
||||
option.POM_DEPTH = Depth
|
||||
@ -549,7 +548,7 @@ screen.Ambient_light.comment = Configure settings related to the lighting in sha
|
||||
option.LPV_REDSTONE_LIGHTS.comment = Allows redstone blocks to contribute to colored lighting.
|
||||
option.LPV_COLORED_CANDLES.comment = Allows colored candles to emit matching colored lighting.
|
||||
|
||||
screen.LabPBR.comment = A handfull of effects that use information provided by any resourcepack that follows the LabPBR format.
|
||||
screen.Resource_Pack_Support.comment = A handfull of effects that use information provided by a resourcepack.
|
||||
screen.Reflections.comment = Configure the reflections that use information provided by a LabPBR resourcepack.
|
||||
option.Specular_Reflections.comment = Toggle all reflections for Labpbr packs. This enables the sun reflection, and allows other settings to be enabled below. §aPERFORMANCE COST:§r low
|
||||
option.Screen_Space_Reflections.comment = Toggle screen-space reflections. §aPERFORMANCE COST:§r medium
|
||||
@ -573,7 +572,6 @@ screen.Emissives.comment = §bWhat is this?§r Emissiveness is just how much lig
|
||||
option.Emissive_Curve.comment = This determines how quickly the emissive texture reaches its brightest point. 1.0 is linear.
|
||||
|
||||
screen.POM.comment = Configure settings related to parallax occlusion mapping that uses information provided by a resourcepack.
|
||||
option.HEIGTHMAP_DEPTH_OFFSET.comment = §bWhat is this?§r This makes the resourcepack provided "heightmap" offset the depth that a lot of effects use. This allows for finer details nearby, and can work as a "budget POM". §aPERFORMANCE COST:§r low to medium - use this if POM is too hard to run.
|
||||
option.POM.comment = §bWhat is this?§r This effect attempts to create 3D geometry where there previously was none, by using a special image from a resourcepack. This effect basically only pushes inwards, so some artifacts can exist when looking at steep angles. §aPERFORMANCE COST:§r medium to high
|
||||
option.MAX_ITERATIONS.comment = Configure the quality of the parallax occlusion mapping effect. if you see individual layers when looking up close, inscreasing this makes more layers, so they will become harder to see. §aPERFORMANCE COST:§r high
|
||||
option.POM_DEPTH.comment = How deep the parallax occlusion mapping effect can go into a surface. §aPERFORMANCE COST:§r very low
|
||||
@ -697,11 +695,29 @@ option.SKY_GROUND.comment = §bWhat is this?§r This is the dark bottom half of
|
||||
option.SNELLS_WINDOW.comment = §bWhat is this?§r this is the dark reflective circle you see when under-water. This is an approximation of a thing that happens in reality known as "total internal reflection". §aPERFORMANCE COST:§r very very very small.
|
||||
option.entityShadowDistanceMul.comment = §bWhat is this?§r Configure how far shadows should work for entities. This is good if you want to keep entity shadows and improved performance in high entity areas.
|
||||
|
||||
screen.DISTANT_HORIZONS_SETTINGS = §2Distant Horizons §fsettings
|
||||
screen.DISTANT_HORIZONS_SETTINGS = Distant Horizons - §cIRIS REQUIRED§r
|
||||
option.DH_OVERDRAW_PREVENTION = Overdraw prevention
|
||||
option.OVERDRAW_MAX_DISTANCE = Max distance for overdraw prevention
|
||||
value.OVERDRAW_MAX_DISTANCE.0 = Unlimited
|
||||
value.OVERDRAW_MAX_DISTANCE.32 = 2 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.48 = 3 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.64 = 4 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.80 = 5 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.96 = 6 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.112 = 7 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.128 = 8 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.144 = 9 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.160 = 10 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.176 = 11 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.192 = 12 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.208 = 13 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.224 = 14 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.240 = 15 Chunks
|
||||
value.OVERDRAW_MAX_DISTANCE.256 = 16 Chunks
|
||||
|
||||
option.DH_KNOWN_ISSUES =
|
||||
value.DH_KNOWN_ISSUES.0 = §c CLICK THIS TEXT TO LOOP THROUGH A LIST OF KNOWN ISSUES
|
||||
value.DH_KNOWN_ISSUES.1 = §a GTAO, RTAO, and SSGI break on LODs - DH support unimplemented
|
||||
option.DH_AMBIENT_OCCLUSION = ambient occlusion on LOD chunks
|
||||
option.DH_SUBSURFACE_SCATTERING = sub-surface scattering on LOD chunks
|
||||
option.DH_SCREENSPACE_REFLECTIONS = screen-space reflections on LOD chunks
|
||||
|
||||
option.DISTANT_HORIZONS_SHADOWMAP = §c(DO NOT USE IF YOU DO NOT KNOW WHAT THIS IS)§r DH shadowmap support
|
||||
option.DISTANT_HORIZONS_SHADOWMAP.comment = §cTHIS SETTING WILL DESTROY PERFORMANCE THIS WILL MAKE SHADOWS LOOK BLOCKY, FLICKERY, AND LOW DETAIL§r. set shadow distance to 32 chunks (or more). set shadow resolution to 4096 (or more)
|
||||
|
@ -259,7 +259,7 @@ screen.Post_Processing = Pós-processamento
|
||||
option.SCALE_FACTOR = Determinante de Tamanho
|
||||
|
||||
|
||||
screen.LabPBR = LabPBR
|
||||
screen.Resource_Pack_Support = Resource_Pack_Support
|
||||
screen.Reflections = Reflexos Especulares
|
||||
option.Specular_Reflections = Reflexos Especulares
|
||||
option.Screen_Space_Reflections = Reflexos no Espaço da Tela / SSR
|
||||
@ -370,7 +370,7 @@ screen.Ambient_light.comment = Ajustes relacionados a luz em lugares sombreados
|
||||
screen.Ambient_Colors.comment = Ajuste a cor da luz em lugares sombreados.
|
||||
screen.Torch_Colors.comment = Ajuste a cor da luz da tocha ou outras fontes de luz.
|
||||
|
||||
screen.LabPBR.comment = Um punhado de efeitos que usam informações de um pacote de textura que usa o formato LabPBR.
|
||||
screen.Resource_Pack_Support.comment = Um punhado de efeitos que usam informações de um pacote de textura que usa o formato LabPBR.
|
||||
screen.Reflections.comment = Ajuste os reflexos que utilizam informações de um pacote de textura LabPBR.
|
||||
option.Specular_Reflections.comment = Habilita todos os reflexos para pacotes LabPBR. Isso permite o reflexo do sol, além de várias outras configurações abaixo. §aCUSTO DE PERFORMANCE:§r Baixo
|
||||
option.Screen_Space_Reflections.comment = Habilita reflexos no espaço de tela. §aCUSTO DE PERFORMANCE:§r Médio
|
||||
|
@ -439,7 +439,7 @@ screen.Post_Processing = Постобработка
|
||||
option.HIGHLIGHTS_GRADE_MUL = Яркость основного освещения
|
||||
|
||||
|
||||
screen.LabPBR = Эффекты LabPBR
|
||||
screen.Resource_Pack_Support = Эффекты LabPBR
|
||||
screen.Reflections = Зеркальные отражения
|
||||
option.Specular_Reflections = Зеркальные отражения
|
||||
option.Screen_Space_Reflections = Отражения в пространстве экрана
|
||||
@ -461,7 +461,6 @@ screen.LabPBR = Эффекты LabPBR
|
||||
|
||||
|
||||
screen.POM = Параллаксная окклюзия/POM
|
||||
option.HEIGTHMAP_DEPTH_OFFSET = Heightmap in Depth
|
||||
option.POM = Параллаксная окклюзия
|
||||
option.MAX_ITERATIONS = Качество
|
||||
option.POM_DEPTH = Глубина
|
||||
@ -591,7 +590,7 @@ screen.Ambient_light.comment = Настройте параметры, связа
|
||||
screen.Ambient_Colors.comment = Настройте цвет освещения в затененных областях
|
||||
screen.Torch_Colors.comment = Настройте цвет света от факелов или других размещенных источников света
|
||||
|
||||
screen.LabPBR.comment = Множество эффектов, использующих информацию, предоставляемую любым пакетом ресурсов, который соответствует формату LabPBR
|
||||
screen.Resource_Pack_Support.comment = Множество эффектов, использующих информацию, предоставляемую любым пакетом ресурсов, который соответствует формату LabPBR
|
||||
screen.Reflections.comment = Настройте отражения, использующие информацию, предоставленную пакетом ресурсов LabPBR
|
||||
option.Specular_Reflections.comment = Переключите все отражения для пакетов LabPBR. Это включает отражение солнца и позволяет включить другие настройки, указанные ниже. §aНАГРУЗКА:§r низкая
|
||||
option.Screen_Space_Reflections.comment = Переключение отражений в пространстве экрана. §aНАГРУЗКА:§r средняя
|
||||
@ -615,7 +614,6 @@ screen.Emissives.comment = §bЧто это?§r Излучательная сп
|
||||
option.Emissive_Curve.comment = Это определяет, как быстро излучение текстур достигнет своей самой яркой точки. 1.0 является линейным
|
||||
|
||||
screen.POM.comment = Настройте параметры, связанные с отображением параллаксной окклюзии, в котором используется информация, предоставляемая пакетом ресурсов
|
||||
option.HEIGTHMAP_DEPTH_OFFSET.comment = §bЧто это?§r Это приводит к тому, что предоставляемая пакетом ресурсов "карта высот" компенсирует глубину, используемую многими эффектами. Это позволяет видеть более мелкие детали поблизости и может работать как "бюджетный POM". §aНАГРУЗКА:§r от низкой до средней - используйте этот параметр, если POM слишком сложно запускать
|
||||
option.POM.comment = §bЧто это?§r Этот эффект пытается создать трехмерную геометрию там, где ее раньше не было, используя специальное изображение из пакета ресурсов. Этот эффект в основном направлен только внутрь, поэтому при взгляде под крутыми углами могут наблюдаться некоторые артефакты. §aНАГРУЗКА:§r от средней до высокой
|
||||
option.MAX_ITERATIONS.comment = Настройте качество отображения эффекта параллаксной окклюзии. если вы видите отдельные слои при близком рассмотрении, при увеличении этого параметра слоев становится больше, поэтому их будет труднее разглядеть. §aНАГРУЗКА:§r высокая
|
||||
option.POM_DEPTH.comment = Насколько глубоко эффект отображения параллаксной окклюзии может проникнуть в поверхность. §aНАГРУЗКА:§r очень низкая
|
||||
|
@ -426,7 +426,7 @@ screen.Post_Processing = 后期处理
|
||||
option.HIGHLIGHTS_GRADE_MUL = 亮部 - 亮度
|
||||
|
||||
|
||||
screen.LabPBR = Lab PBR
|
||||
screen.LabResource_Pack_SupportPBR = Lab PBR
|
||||
screen.Reflections = 高光反射
|
||||
option.Specular_Reflections = 高光反射
|
||||
option.Screen_Space_Reflections = 屏幕空间反射 (SSR)
|
||||
@ -448,7 +448,6 @@ screen.LabPBR = Lab PBR
|
||||
|
||||
|
||||
screen.POM = 视差遮蔽映射 (POM)
|
||||
option.HEIGTHMAP_DEPTH_OFFSET = 基于高度图的深度偏移
|
||||
option.POM = 视差 (POM)
|
||||
option.MAX_ITERATIONS = 视差质量
|
||||
option.POM_DEPTH = 视差深度
|
||||
@ -536,7 +535,7 @@ screen.Ambient_light.comment = 配置和遮蔽处的照明相关的设置.
|
||||
screen.Ambient_Colors.comment = 配置阴影区域的照明颜色.
|
||||
screen.Torch_Colors.comment = 配置火把或其它可放置光源的颜色.
|
||||
|
||||
screen.LabPBR.comment = 由遵循 LabPBR 格式的资源包提供部分信息的小部分效果.
|
||||
screen.Resource_Pack_Support.comment = 由遵循 LabPBR 格式的资源包提供部分信息的小部分效果.
|
||||
screen.Reflections.comment = 配置由 LabPBR 格式的资源包所提供信息的反射.
|
||||
option.Specular_Reflections.comment = LabPBR 资源包所有反射的开关. 本选项同时启用太阳反射, 同时允许以下其它设置启用. §a性能消耗水平:§r 低.
|
||||
option.Screen_Space_Reflections.comment = 屏幕空间反射开关. §a性能消耗水平:§r 中.
|
||||
@ -560,7 +559,6 @@ screen.Emissives.comment = §b这啥?§r 自发光亮度是指某方块发光量
|
||||
option.Emissive_Curve.comment = 调整自发光纹理达到最高亮度的容易程度/速度. 1.0 是线性.
|
||||
|
||||
screen.POM.comment = 配置由资源包提供信息的视差遮蔽映射的相关设置.
|
||||
option.HEIGTHMAP_DEPTH_OFFSET.comment = §b这啥?§r 使用资源包提供的 “高度图” 的偏移抵消许多效果所需的深度. 允许近处有更多细节, 同时作为 “POM 的性能预算” 而生效. §a性能消耗水平:§r 低偏中 - 如果设备负担不起了 POM 的性能消耗, 可使用本选项.
|
||||
option.POM.comment = §b这啥?§r 通过使用资源包中的特殊图像, 在实际没有的区域渲染出 3D 几何图形. 这种效果基本上只向内凹, 所以大角度观察时, 会存在一些伪影. §a性能消耗水平:§r 中偏高.
|
||||
option.MAX_ITERATIONS.comment = 配置视差效果的质量. 如果近距离仅看到了部分层, 则需要提高本项数值, 不然很难看到. §a性能消耗水平:§r 高.
|
||||
option.POM_DEPTH.comment = 视差效果表面凹陷程度. §a性能消耗水平:§r 非常低.
|
||||
@ -747,7 +745,6 @@ option.TRANSLUCENT_COLORED_SHADOWS.comment = §b这啥?§r 本选项的效果可
|
||||
option.Exposure_Speed=曝光速度
|
||||
option.Manual_exposure_value=手动曝光值
|
||||
|
||||
option.AUTOFOCUS=自动对焦
|
||||
option.focal=焦距
|
||||
option.aperture=光圈
|
||||
option.DoF_Adaptation_Speed=景深虚化自适应速度
|
||||
|
@ -128,7 +128,7 @@ vec3 calculateAtmosphere(vec3 background, vec3 viewVector, vec3 upVector, vec3 s
|
||||
transmittance = vec3(1.0);
|
||||
|
||||
float high_sun = clamp(pow(sunVector.y+0.6,5),0.0,1.0) * 3.0; // make sunrise less blue, and allow sunset to be bluer
|
||||
float low_sun = clamp(((1.0-abs(sunVector.y))*3.) - high_sun,1.0,2.0) ;
|
||||
float low_sun = clamp(((1.0-abs(sunVector.y))*3.) - high_sun,1.0,1.8) ;
|
||||
|
||||
|
||||
for (int i = 0; i < iSteps; ++i, position += increment) {
|
||||
|
@ -153,22 +153,6 @@
|
||||
FinalFogColor = mix(FinalFogColor, BiomeColors, Inbiome);
|
||||
}
|
||||
|
||||
// void BiomeSunlightColor(
|
||||
// inout vec3 FinalSunlightColor
|
||||
// ){
|
||||
// // this is a little complicated? lmao
|
||||
// vec3 BiomeColors = vec3(0.0);
|
||||
// BiomeColors.r = isSwamps*SWAMP_R + isJungles*JUNGLE_R + isDarkForests*DARKFOREST_R + sandStorm*1.0 + snowStorm*0.6;
|
||||
// BiomeColors.g = isSwamps*SWAMP_G + isJungles*JUNGLE_G + isDarkForests*DARKFOREST_G + sandStorm*0.5 + snowStorm*0.8;
|
||||
// BiomeColors.b = isSwamps*SWAMP_B + isJungles*JUNGLE_B + isDarkForests*DARKFOREST_B + sandStorm*0.3 + snowStorm*1.0;
|
||||
|
||||
// // these range 0.0-1.0. they will never overlap.
|
||||
// float Inbiome = isJungles+isSwamps+isDarkForests+sandStorm+snowStorm;
|
||||
|
||||
// // interpoloate between normal fog colors and biome colors. the transition speeds are conrolled by the biome uniforms.
|
||||
// FinalSunlightColor = mix(FinalSunlightColor, FinalSunlightColor * (BiomeColors*0.8+0.2), Inbiome);
|
||||
// }
|
||||
|
||||
void BiomeFogDensity(
|
||||
inout vec4 UniformDensity,
|
||||
inout vec4 CloudyDensity,
|
||||
@ -178,8 +162,11 @@
|
||||
float Inbiome = isJungles+isSwamps+isDarkForests+sandStorm+snowStorm;
|
||||
|
||||
vec2 BiomeFogDensity = vec2(0.0); // x = uniform || y = cloudy
|
||||
BiomeFogDensity.x = isSwamps*SWAMP_UNIFORM_DENSITY + isJungles*JUNGLE_UNIFORM_DENSITY + isDarkForests*DARKFOREST_UNIFORM_DENSITY + sandStorm*15 + snowStorm*150;
|
||||
BiomeFogDensity.y = isSwamps*SWAMP_CLOUDY_DENSITY + isJungles*JUNGLE_CLOUDY_DENSITY + isDarkForests*DARKFOREST_CLOUDY_DENSITY + sandStorm*255 + snowStorm*255;
|
||||
// BiomeFogDensity.x = isSwamps*SWAMP_UNIFORM_DENSITY + isJungles*JUNGLE_UNIFORM_DENSITY + isDarkForests*DARKFOREST_UNIFORM_DENSITY + sandStorm*15 + snowStorm*150;
|
||||
// BiomeFogDensity.y = isSwamps*SWAMP_CLOUDY_DENSITY + isJungles*JUNGLE_CLOUDY_DENSITY + isDarkForests*DARKFOREST_CLOUDY_DENSITY + sandStorm*255 + snowStorm*255;
|
||||
|
||||
BiomeFogDensity.x = isSwamps*SWAMP_UNIFORM_DENSITY + isJungles*JUNGLE_UNIFORM_DENSITY + isDarkForests*DARKFOREST_UNIFORM_DENSITY + sandStorm*0.0 + snowStorm*0.01;
|
||||
BiomeFogDensity.y = isSwamps*SWAMP_CLOUDY_DENSITY + isJungles*JUNGLE_CLOUDY_DENSITY + isDarkForests*DARKFOREST_CLOUDY_DENSITY + sandStorm*0.5 + snowStorm*0.5;
|
||||
|
||||
UniformDensity = mix(UniformDensity, vec4(BiomeFogDensity.x), Inbiome*maxDistance);
|
||||
CloudyDensity = mix(CloudyDensity, vec4(BiomeFogDensity.y), Inbiome*maxDistance);
|
||||
@ -190,12 +177,14 @@
|
||||
// this is a little complicated? lmao
|
||||
vec3 BiomeColors = vec3(0.0);
|
||||
BiomeColors.r = isSwamps*SWAMP_R + isJungles*JUNGLE_R + isDarkForests*DARKFOREST_R + sandStorm*1.0 + snowStorm*0.6;
|
||||
BiomeColors.g = isSwamps*SWAMP_G + isJungles*JUNGLE_G + isDarkForests*DARKFOREST_G + sandStorm*0.5 + snowStorm*0.8;
|
||||
BiomeColors.b = isSwamps*SWAMP_B + isJungles*JUNGLE_B + isDarkForests*DARKFOREST_B + sandStorm*0.3 + snowStorm*1.0;
|
||||
BiomeColors.g = isSwamps*SWAMP_G + isJungles*JUNGLE_G + isDarkForests*DARKFOREST_G + sandStorm*0.3 + snowStorm*0.8;
|
||||
BiomeColors.b = isSwamps*SWAMP_B + isJungles*JUNGLE_B + isDarkForests*DARKFOREST_B + sandStorm*0.1 + snowStorm*1.0;
|
||||
|
||||
// insure the biome colors are locked to the fog shape and lighting, but not its orignal color.
|
||||
DirectLightCol = BiomeColors * max(dot(DirectLightCol,vec3(0.33333)), MIN_LIGHT_AMOUNT*0.025 + nightVision*0.2);
|
||||
// DirectLightCol = BiomeColors * max(dot(DirectLightCol,vec3(0.33333)), MIN_LIGHT_AMOUNT*0.025 + nightVision*0.2);
|
||||
// IndirectLightCol = BiomeColors * max(dot(IndirectLightCol,vec3(0.33333)), MIN_LIGHT_AMOUNT*0.025 + nightVision*0.2);
|
||||
|
||||
DirectLightCol = BiomeColors * max(dot(DirectLightCol,vec3(0.33333)), MIN_LIGHT_AMOUNT*0.025 + nightVision*0.2);
|
||||
IndirectLightCol = BiomeColors * max(dot(IndirectLightCol,vec3(0.33333)), MIN_LIGHT_AMOUNT*0.025 + nightVision*0.2);
|
||||
|
||||
// these range 0.0-1.0. they will never overlap.
|
||||
@ -212,27 +201,28 @@
|
||||
|
||||
#ifdef TIMEOFDAYFOG
|
||||
// uniform int worldTime;
|
||||
void TimeOfDayFog(
|
||||
inout float Uniform, inout float Cloudy, float maxDistance, float DailyWeather_UniformFogDensity, float DailyWeather_CloudyFogDensity
|
||||
void FogDensities(
|
||||
inout float Uniform, inout float Cloudy, inout float Rainy, float maxDistance, float DailyWeather_UniformFogDensity, float DailyWeather_CloudyFogDensity
|
||||
) {
|
||||
|
||||
float Time = worldTime%24000;
|
||||
|
||||
// set schedules for fog to appear at specific ranges of time in the day.
|
||||
float Morning = clamp((Time-22000)/2000,0,1) + clamp((2000-Time)/2000,0,1);
|
||||
float Noon = clamp(Time/2000,0,1) * clamp((12000-Time)/2000,0,1);
|
||||
float Evening = clamp((Time-10000)/2000,0,1) * clamp((14000-Time)/2000,0,1) ;
|
||||
float Night = clamp((Time-13000)/2000,0,1) * clamp((23000-Time)/2000,0,1) ;
|
||||
float Morning = clamp((Time-22000.0)/2000.0,0.0,1.0) + clamp((2000.0-Time)/2000.0,0.0,1.0);
|
||||
float Noon = clamp(Time/2000.0,0.0,1.0) * clamp((12000.0-Time)/2000.0,0.0,1.0);
|
||||
float Evening = clamp((Time-10000.0)/2000.0,0.0,1.0) * clamp((14000.0-Time)/2000.0,0.0,1.0);
|
||||
float Night = clamp((Time-13000.0)/2000.0,0.0,1.0) * clamp((23000.0-Time)/2000.0,0.0,1.0);
|
||||
|
||||
// set densities. morn, noon, even, night
|
||||
vec4 UniformDensity = TOD_Fog_mult * vec4(Morning_Uniform_Fog, Noon_Uniform_Fog, Evening_Uniform_Fog, Night_Uniform_Fog);
|
||||
vec4 CloudyDensity = TOD_Fog_mult * vec4(Morning_Cloudy_Fog, Noon_Cloudy_Fog, Evening_Cloudy_Fog, Night_Cloudy_Fog);
|
||||
|
||||
|
||||
Rainy = Rainy*RainFog_amount;
|
||||
|
||||
#ifdef Daily_Weather
|
||||
// let daily weather influence fog densities.
|
||||
UniformDensity = max(UniformDensity, DailyWeather_UniformFogDensity * 50.0);
|
||||
CloudyDensity = max(CloudyDensity, DailyWeather_CloudyFogDensity * 50.0);
|
||||
// DailyWeather_FogDensity(UniformDensity, CloudyDensity);
|
||||
UniformDensity = max(UniformDensity, DailyWeather_UniformFogDensity);
|
||||
CloudyDensity = max(CloudyDensity, DailyWeather_CloudyFogDensity);
|
||||
#endif
|
||||
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
|
@ -31,12 +31,11 @@ vec3 DoAmbientLightColor(
|
||||
float Exposure
|
||||
){
|
||||
// Lightmap = vec2(0.0,1.0);
|
||||
|
||||
float LightLevelZero = clamp(pow(eyeBrightnessSmooth.y/240. + Lightmap.y,2.0) ,0.0,1.0);
|
||||
// float LightLevelZero = clamp(pow(eyeBrightnessSmooth.y/240. + Lightmap.y,2.0) ,0.0,1.0);
|
||||
|
||||
// do sky lighting.
|
||||
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
||||
vec3 MinimumLight = MinimumColor * (MIN_LIGHT_AMOUNT*0.01 + nightVision);
|
||||
vec3 MinimumLight = MinimumColor * max(MIN_LIGHT_AMOUNT*0.01, nightVision * 0.1);
|
||||
vec3 IndirectLight = max(SkyColor * ambient_brightness * skyLM * 0.7, MinimumLight);
|
||||
|
||||
// do torch lighting
|
||||
|
@ -57,7 +57,7 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
damageDistortion = mix(damageDistortion, vignette * (0.5 + noise), CriticalDamageTaken) * MOTION_AMOUNT;
|
||||
|
||||
// apply death distortion effect
|
||||
distortmask = isDead ? noise*0.7 : damageDistortion;
|
||||
distortmask = isDead ? vignette * (0.7 + noise*0.3) : damageDistortion;
|
||||
#endif
|
||||
//////////////////////// WATER DISTORTION /////////////////////
|
||||
#if defined WATER_ON_CAMERA_EFFECT
|
||||
@ -81,14 +81,6 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
vec2 zoomUV = 0.5 + (texcoord - 0.5) * (1.0 - distortmask);
|
||||
vec3 distortedColor = texture2D(colortex7, zoomUV).rgb;
|
||||
|
||||
#ifdef TONE_CURVE
|
||||
distortedColor = toneCurve(distortedColor);
|
||||
#endif
|
||||
#ifdef COLOR_GRADING_ENABLED
|
||||
distortedColor = colorGrading(distortedColor);
|
||||
#endif
|
||||
applyContrast(distortedColor, CONTRAST);
|
||||
|
||||
#ifdef WATER_ON_CAMERA_EFFECT
|
||||
// apply the distorted water color to the scene, but revert back to before when it ends
|
||||
if(exitWater > 0.01) color = distortedColor;
|
||||
@ -108,11 +100,10 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
#endif
|
||||
|
||||
#ifdef DAMAGE_TAKEN_EFFECT
|
||||
color = mix(color, distortedColorLuma, vignette * sqrt(MinorDamageTaken));
|
||||
color = mix(color, distortedColorLuma, vignette * sqrt(min(MinorDamageTaken,1.0)));
|
||||
color = mix(color, distortedColorLuma, sqrt(CriticalDamageTaken));
|
||||
#endif
|
||||
|
||||
if(isDead) color = distortedColorLuma * 0.3;
|
||||
if(isDead) color = distortedColorLuma * 0.35;
|
||||
#endif
|
||||
|
||||
}
|
@ -339,10 +339,9 @@ void ApplySSRT(
|
||||
if(isGrass) rayDir.y = clamp(rayDir.y + 0.5,-1,1);
|
||||
|
||||
// rayDir.y = mix(-1.0, rayDir.y, lightmaps.y*lightmaps.y);
|
||||
|
||||
skycontribution = ((skyCloudsFromTexLOD(rayDir, colortex4, 0).rgb / 30.0) * 2.5 * ambient_brightness) * Lighting.a + skylightcolor*(1-Lighting.a) + Lighting.rgb;
|
||||
skycontribution = pow(skyCloudsFromTexLOD(rayDir, colortex4, 0).rgb/30, vec3(0.7)) *2.5 * ambient_brightness * Lighting.a + Lighting.rgb;
|
||||
#else
|
||||
skycontribution = ((skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 30.0) * 2.5 * ambient_brightness) * Lighting.a + skylightcolor*(1-Lighting.a) + Lighting.rgb;
|
||||
skycontribution = (pow(skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 30.0,vec3(0.7)) * 2.5 * ambient_brightness) * Lighting.a + skylightcolor*(1-Lighting.a) + Lighting.rgb;
|
||||
#endif
|
||||
#else
|
||||
|
||||
|
@ -15,45 +15,37 @@ float densityAtPosFog(in vec3 pos){
|
||||
|
||||
float cloudVol(in vec3 pos, float maxDistance ){
|
||||
|
||||
float fogYstart = FOG_START_HEIGHT+3;
|
||||
vec3 samplePos = pos*vec3(1.0,1./24.,1.0);
|
||||
vec3 samplePos2 = pos*vec3(1.0,1./48.,1.0);
|
||||
float fogYstart = FOG_START_HEIGHT+3;
|
||||
|
||||
float mult = exp( -max((pos.y - fogYstart) / 35.,0.0));
|
||||
float fog_shape = 1.0 - densityAtPosFog(samplePos * 24.0 );
|
||||
float fog_eroded = 1.0 - densityAtPosFog(samplePos2 * 200.0 );
|
||||
|
||||
// float CloudyFog = max( (fog_shape*2.0 - fog_eroded*0.5) - 1.2, max(fog_shape-0.8,0.0)) * mult;
|
||||
|
||||
float heightlimit = exp2( -max((pos.y - fogYstart * (1.0+snowStorm)) / 25.,0.0));
|
||||
float CloudyFog = max((fog_shape*1.2 - fog_eroded*0.2) - 0.75,0.0) * heightlimit ;
|
||||
|
||||
float UniformFog = exp( max(pos.y - fogYstart,0.0) / -25);
|
||||
// UniformFog = 1.0;
|
||||
|
||||
float RainFog = ((2 + max(fog_shape*10. - 7.0,0.5)*2.0)) *UniformFog* rainStrength * noPuddleAreas * RainFog_amount;
|
||||
// float RainFog = (CloudyFog*255) * rainStrength * noPuddleAreas * RainFog_amount;
|
||||
float uniformFog = 0.0;
|
||||
|
||||
float low_gradientFog = exp2(-0.3 * max(pos.y - fogYstart,0.0));
|
||||
float medium_gradientFog = exp2(-0.15 * max(pos.y - fogYstart,0.0));
|
||||
float high_gradientFog = exp2(-0.06 * max(pos.y - fogYstart,0.0));
|
||||
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
// sandstorms and snowstorms
|
||||
if(sandStorm > 0 || snowStorm > 0) CloudyFog = mix(CloudyFog, max(densityAtPosFog((samplePos2 - vec3(frameTimeCounter,0,frameTimeCounter)*10) * 100.0 ) - 0.2,0.0) * heightlimit, sandStorm+snowStorm);
|
||||
#endif
|
||||
|
||||
TimeOfDayFog(UniformFog, CloudyFog, maxDistance, dailyWeatherParams0.a, dailyWeatherParams1.a);
|
||||
|
||||
float noise = densityAtPosFog(samplePos * 12.0);
|
||||
float erosion = 1.0-densityAtPosFog(samplePos2 * (125 - (1-pow(1-noise,5))*25));
|
||||
|
||||
|
||||
// float clumpyFog = max(exp(noise * -5)*2 - (erosion*erosion), 0.0);
|
||||
|
||||
// float testfogshapes = clumpyFog*30;
|
||||
// return testfogshapes;
|
||||
|
||||
// return max(exp( max(pos.y - 90,0.0) / -1), 0.0) * 100;
|
||||
return CloudyFog + UniformFog + RainFog;
|
||||
float fog_shape = 0.0;
|
||||
float fog_erosion = 0.0;
|
||||
if(sandStorm < 1.0 && snowStorm < 1.0){
|
||||
fog_shape = 1.0 - densityAtPosFog(samplePos * 24.0);
|
||||
fog_erosion = 1.0 - densityAtPosFog(samplePos2 * 200.0 - vec3(min(max(fog_shape - 0.6 ,0.0) * 2.0 ,1.0)*200.0));
|
||||
}
|
||||
|
||||
float cloudyFog = max(min(max(fog_shape - 0.6 ,0.0) * 2.0 ,1.0) - fog_erosion * 0.4 , 0.0) * exp(-0.05 * max(pos.y - (fogYstart+20),0.0));
|
||||
float rainyFog = (low_gradientFog * 0.5 + exp2(-0.06 * max(pos.y - fogYstart,0.0))) * rainStrength * noPuddleAreas;
|
||||
|
||||
if(sandStorm > 0.0 || snowStorm > 0.0){
|
||||
float IntenseFogs = pow(1.0 - densityAtPosFog( (samplePos2 - vec3(frameTimeCounter,0,frameTimeCounter)*15.0) * 100.0),2.0) * mix(1.0, high_gradientFog, snowStorm);
|
||||
cloudyFog = mix(cloudyFog, IntenseFogs, sandStorm+snowStorm);
|
||||
|
||||
medium_gradientFog = 1.0;
|
||||
}
|
||||
|
||||
FogDensities(medium_gradientFog, cloudyFog, rainyFog, maxDistance, dailyWeatherParams0.a, dailyWeatherParams1.a);
|
||||
|
||||
// return medium_gradientFog;
|
||||
return uniformFog + medium_gradientFog + cloudyFog + rainyFog;
|
||||
}
|
||||
|
||||
float phaseRayleigh(float cosTheta) {
|
||||
@ -70,17 +62,26 @@ float fogPhase(float lightPoint){
|
||||
return exponential;
|
||||
}
|
||||
|
||||
uniform ivec2 eyeBrightness;
|
||||
uniform int dhRenderDistance;
|
||||
vec4 GetVolumetricFog(
|
||||
vec3 viewPosition,
|
||||
vec2 dither,
|
||||
vec3 LightColor,
|
||||
vec3 AmbientColor
|
||||
vec3 AmbientColor,
|
||||
vec3 AveragedAmbientColor
|
||||
){
|
||||
|
||||
#ifndef TOGGLE_VL_FOG
|
||||
return vec4(0.0,0.0,0.0,1.0);
|
||||
#endif
|
||||
|
||||
int SAMPLECOUNT = VL_SAMPLES;
|
||||
|
||||
vec3 color = vec3(0.0);
|
||||
float absorbance = 1.0;
|
||||
|
||||
float lightleakfix = 1.0 - caveDetection;
|
||||
float lightleakfix2 = pow(clamp(eyeBrightnessSmooth.y/240. ,0.0,1.0),3.0);
|
||||
/// ------------- RAYMARCHING STUFF ------------- \\\
|
||||
|
||||
//project pixel position into projected shadowmap space
|
||||
@ -99,8 +100,7 @@ vec4 GetVolumetricFog(
|
||||
vec3 dVWorld = (wpos-gbufferModelViewInverse[3].xyz);
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float maxLength = min(length(dVWorld), max(dhFarPlane-1000,0.0))/length(dVWorld);
|
||||
SAMPLECOUNT += SAMPLECOUNT;
|
||||
float maxLength = min(length(dVWorld), max(far, dhRenderDistance))/length(dVWorld);
|
||||
#else
|
||||
float maxLength = min(length(dVWorld), far)/length(dVWorld);
|
||||
#endif
|
||||
@ -108,32 +108,32 @@ vec4 GetVolumetricFog(
|
||||
dV *= maxLength;
|
||||
dVWorld *= maxLength;
|
||||
|
||||
float dL = length(dVWorld);
|
||||
float mult = length(dVWorld)/25;
|
||||
// why 8.0? i dunno it looked nice
|
||||
float dL = length(dVWorld)/8.0;
|
||||
float dL_alternate = length(dVWorld);
|
||||
|
||||
vec3 progress = start.xyz;
|
||||
vec3 progressW = gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
|
||||
vec3 WsunVec = mat3(gbufferModelViewInverse) * sunVec * lightCol.a;
|
||||
vec3 WsunVec = mat3(gbufferModelViewInverse) * sunVec ;
|
||||
float SdotV = dot(sunVec,normalize(viewPosition))*lightCol.a;
|
||||
|
||||
|
||||
/// ------------- COLOR/LIGHTING STUFF ------------- \\\
|
||||
|
||||
vec3 color = vec3(0.0);
|
||||
vec3 absorbance = vec3(1.0);
|
||||
|
||||
///// ----- fog lighting
|
||||
//Mie phase + somewhat simulates multiple scattering (Horizon zero down cloud approx)
|
||||
float mie = fogPhase(SdotV) * 5.0;
|
||||
float sunPhase = fogPhase(SdotV) * 5.0;
|
||||
float skyPhase = pow(clamp(normalize(wpos).y*0.5+0.5,0.0,1.0),4.0)*5.0;
|
||||
float rayL = phaseRayleigh(SdotV);
|
||||
|
||||
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5);
|
||||
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5) ;
|
||||
vec3 mC = vec3(fog_coefficientMieR*1e-6, fog_coefficientMieG*1e-6, fog_coefficientMieB*1e-6);
|
||||
|
||||
|
||||
vec3 skyLightPhased = AmbientColor;
|
||||
vec3 LightSourcePhased = LightColor;
|
||||
|
||||
skyLightPhased *= 1.0 + skyPhase;
|
||||
LightSourcePhased *= sunPhase;
|
||||
|
||||
#ifdef ambientLight_only
|
||||
LightSourcePhased = vec3(0.0);
|
||||
#endif
|
||||
@ -142,81 +142,47 @@ vec4 GetVolumetricFog(
|
||||
vec3 biomeIndirect = skyLightPhased;
|
||||
float inBiome = BiomeVLFogColors(biomeDirect, biomeIndirect);
|
||||
#endif
|
||||
|
||||
skyLightPhased = max(skyLightPhased + skyLightPhased*(normalize(wpos).y*0.9+0.1),0.0);
|
||||
LightSourcePhased *= mie;
|
||||
|
||||
float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||
|
||||
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||
vec3 SkyLightColor = AmbientColor;
|
||||
vec3 LightSourceColor = LightColor;
|
||||
|
||||
#ifdef ambientLight_only
|
||||
LightSourceColor = vec3(0.0);
|
||||
#endif
|
||||
|
||||
float shadowStep = 200.0;
|
||||
|
||||
vec3 dV_Sun = WsunVec*shadowStep;
|
||||
|
||||
float mieDay = phaseg(SdotV, 0.75);
|
||||
float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5) ;
|
||||
|
||||
vec3 directScattering = LightSourceColor * mieDay * 3.14;
|
||||
vec3 directMultiScattering = LightSourceColor * mieDayMulti * 3.14;
|
||||
|
||||
vec3 sunIndirectScattering = LightSourceColor * phaseg(dot(mat3(gbufferModelView)*vec3(0,1,0),normalize(viewPosition)), 0.5) * 3.14;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float atmosphereMult = 1.0;
|
||||
#else
|
||||
float atmosphereMult = 1.5;
|
||||
float atmosphereMult = 1.5;
|
||||
#endif
|
||||
|
||||
|
||||
float expFactor = 11.0;
|
||||
for (int i=0;i<SAMPLECOUNT;i++) {
|
||||
float d = (pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT))/expFactor - 1.0/expFactor)/(1-1.0/expFactor);
|
||||
float dd = pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT)) * log(expFactor) / float(SAMPLECOUNT)/(expFactor-1.0);
|
||||
|
||||
progress = start.xyz + d*dV;
|
||||
progressW = gbufferModelViewInverse[3].xyz+cameraPosition + d*dVWorld;
|
||||
|
||||
// float curvature = 1-exp(-25*pow(clamp(1.0 - length(progressW - cameraPosition)/(32*80),0.0,1.0),2));
|
||||
|
||||
|
||||
//project into biased shadowmap space
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
float distortFactor = calcDistort(progress.xy);
|
||||
#else
|
||||
float distortFactor = 1.0;
|
||||
#endif
|
||||
vec3 pos = vec3(progress.xy*distortFactor, progress.z);
|
||||
vec3 shadowPos = vec3(progress.xy*distortFactor, progress.z);
|
||||
|
||||
vec3 sh = vec3(1.0);
|
||||
|
||||
if (abs(pos.x) < 1.0-0.5/2048. && abs(pos.y) < 1.0-0.5/2048){
|
||||
pos = pos*vec3(0.5,0.5,0.5/6.0)+0.5;
|
||||
if (abs(shadowPos.x) < 1.0-0.5/2048. && abs(shadowPos.y) < 1.0-0.5/2048){
|
||||
shadowPos = shadowPos*vec3(0.5,0.5,0.5/6.0)+0.5;
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
sh = vec3(shadow2D(shadowtex0, pos).x);
|
||||
sh = vec3(shadow2D(shadowtex0, shadowPos).x);
|
||||
|
||||
if(shadow2D(shadowtex1, pos).x > pos.z && sh.x < 1.0){
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, pos.xy);
|
||||
if(shadow2D(shadowtex1, shadowPos).x > shadowPos.z && sh.x < 1.0){
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, shadowPos.xy);
|
||||
if(translucentShadow.a < 0.9) sh = normalize(translucentShadow.rgb+0.0001);
|
||||
}
|
||||
#else
|
||||
sh = vec3(shadow2D(shadow, pos).x);
|
||||
sh = vec3(shadow2D(shadow, shadowPos).x);
|
||||
#endif
|
||||
|
||||
}
|
||||
vec3 sh2 = sh;
|
||||
|
||||
#ifdef VL_CLOUDS_SHADOWS
|
||||
// if(clamp(progressW.y - CloudLayer1_height,0.0,1.0) < 1.0 && clamp(progressW.y-50,0.0,1.0) > 0.0)
|
||||
sh *= GetCloudShadow_VLFOG(progressW, WsunVec);
|
||||
sh *= GetCloudShadow_VLFOG(progressW, WsunVec * lightCol.a);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
float maxDistance = inBiome * min(max(1.0 - length(d*dVWorld.xz)/(32*8),0.0)*2.0,1.0);
|
||||
@ -224,89 +190,303 @@ vec4 GetVolumetricFog(
|
||||
#else
|
||||
float densityVol = cloudVol(progressW, 0.0) * lightleakfix;
|
||||
#endif
|
||||
|
||||
//Water droplets(fog)
|
||||
float density = densityVol*300.0;
|
||||
float density = densityVol;
|
||||
|
||||
///// ----- main fog lighting
|
||||
|
||||
//Just air
|
||||
vec2 airCoef = exp(-max(progressW.y - SEA_LEVEL, 0.0) / vec2(8.0e3, 1.2e3) * vec2(6.,7.0)) * (atmosphereMult * 24.0) * Haze_amount * clamp(CloudLayer0_height - progressW.y + max(eyeAltitude-(CloudLayer0_height-50),0),0.0,1.0);
|
||||
vec2 airCoef = exp2(-max(progressW.y-SEA_LEVEL,0.0)/vec2(8.0e3, 1.2e3)*vec2(6.,7.0)) * (24.0 * atmosphereMult) * Haze_amount * clamp(CloudLayer0_height - progressW.y + max(eyeAltitude-(CloudLayer0_height-100),0),0.0,1.0);
|
||||
// * clamp(CloudLayer0_height - progressW.y + max(eyeAltitude-(CloudLayer0_height-100),0),0.0,1.0);
|
||||
// * exp2(-0.05 * max(progressW.y - (CloudLayer0_height + max(eyeAltitude-(CloudLayer0_height-50.0),0)),0.0));
|
||||
|
||||
//Pbr for air, yolo mix between mie and rayleigh for water droplets
|
||||
vec3 rL = rC*airCoef.x;
|
||||
vec3 m = (airCoef.y+density) * mC;
|
||||
vec3 rL = rC*(airCoef.x);
|
||||
vec3 m = mC*(airCoef.y+densityVol*300.0);
|
||||
|
||||
// calculate the atmosphere haze seperately and purely on color, so visibility is not harmed.
|
||||
vec3 Atmosphere = LightSourcePhased * sh * (rayL*rL + sunPhase*m) + (AveragedAmbientColor*0.7) * (rL+m) * lightleakfix2;
|
||||
color += (Atmosphere - Atmosphere*exp(-(rL+m)*dd*dL_alternate)) / (rL+m+1e-6);
|
||||
|
||||
// calculate lighting
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
vec3 Atmosphere = mix(skyLightPhased, biomeDirect, maxDistance) * (rL + m); // not pbr so just make the atmosphere also dense fog heh
|
||||
vec3 DirectLight = mix(LightSourcePhased, biomeIndirect, maxDistance) * sh * (rL*rayL + m);
|
||||
vec3 indirectLight = mix(skyLightPhased, biomeIndirect, maxDistance);
|
||||
vec3 DirectLight = mix(LightSourcePhased, biomeDirect, maxDistance) * sh;
|
||||
#else
|
||||
vec3 Atmosphere = skyLightPhased * (rL + m); // not pbr so just make the atmosphere also dense fog heh
|
||||
vec3 DirectLight = LightSourcePhased * sh * (rL*rayL + m);
|
||||
vec3 indirectLight = skyLightPhased;
|
||||
vec3 DirectLight = LightSourcePhased * sh;
|
||||
#endif
|
||||
|
||||
vec3 Lightning = Iris_Lightningflash_VLfog(progressW-cameraPosition, lightningBoltPosition.xyz) * (rL + m);
|
||||
vec3 lighting = DirectLight * lightleakfix + indirectLight * lightleakfix2 + Lightning;
|
||||
|
||||
vec3 foglighting = (Atmosphere + DirectLight + Lightning) * lightleakfix;
|
||||
|
||||
color += (lighting - lighting * exp(-density*dd*dL))*absorbance;
|
||||
absorbance *= max(exp(-density*dd*dL),0.0);
|
||||
|
||||
|
||||
color += (foglighting - foglighting * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*absorbance;
|
||||
absorbance *= clamp(exp(-(rL+m)*dd*dL),0.0,1.0);
|
||||
|
||||
#ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||
//////////////////////////////////////////
|
||||
///// ----- cloud part
|
||||
//////////////////////////////////////////
|
||||
// curvature = clamp(1.0 - length(progressW - cameraPosition)/(32*128),0.0,1.0);
|
||||
|
||||
|
||||
float otherlayer = max(progressW.y - (CloudLayer0_height+99.5), 0.0) > 0.0 ? 0.0 : 1.0;
|
||||
|
||||
float DUAL_MIN_HEIGHT = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
|
||||
float DUAL_MAX_HEIGHT = DUAL_MIN_HEIGHT + 100.0;
|
||||
|
||||
float DUAL_DENSITY = otherlayer > 0.0 ? CloudLayer0_density : CloudLayer1_density;
|
||||
|
||||
if(clamp(progressW.y - DUAL_MAX_HEIGHT,0.0,1.0) < 1.0 && clamp(progressW.y - DUAL_MIN_HEIGHT,0.0,1.0) > 0.0){
|
||||
|
||||
float DUAL_MIN_HEIGHT_2 = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
|
||||
float DUAL_MAX_HEIGHT_2 = DUAL_MIN_HEIGHT + 100.0;
|
||||
|
||||
float cumulus = GetCumulusDensity(-1, progressW, 1, CloudLayer0_height, CloudLayer1_height);
|
||||
float fadedDensity = DUAL_DENSITY * clamp(exp( (progressW.y - (DUAL_MAX_HEIGHT - 75)) / 9.0 ),0.0,1.0);
|
||||
|
||||
float muE = cumulus*fadedDensity;
|
||||
float directLight = 0.0;
|
||||
for (int j=0; j < 3; j++){
|
||||
vec3 shadowSamplePos = progressW + dV_Sun * (0.1 + j * (0.1 + dither.y*0.05));
|
||||
float shadow = GetCumulusDensity(-1, shadowSamplePos, 0, DUAL_MIN_HEIGHT, DUAL_MAX_HEIGHT) * DUAL_DENSITY;
|
||||
|
||||
directLight += shadow;
|
||||
}
|
||||
|
||||
/// shadows cast from one layer to another
|
||||
/// large cumulus -> small cumulus
|
||||
#if defined CloudLayer1 && defined CloudLayer0
|
||||
if(otherlayer > 0.0) directLight += LAYER1_DENSITY * 2.0 * GetCumulusDensity(1, progressW + dV_Sun/abs(dV_Sun.y) * max((LAYER1_minHEIGHT+70*dither.y) - progressW.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT);
|
||||
#endif
|
||||
// // altostratus -> cumulus
|
||||
// #ifdef CloudLayer2
|
||||
// vec3 HighAlt_shadowPos = rayProgress + dV_Sun/abs(dV_Sun.y) * max(LAYER2_HEIGHT - rayProgress.y,0.0);
|
||||
// float HighAlt_shadow = GetAltostratusDensity(HighAlt_shadowPos) * CloudLayer2_density;
|
||||
// directLight += HighAlt_shadow;
|
||||
// #endif
|
||||
|
||||
|
||||
float skyScatter = clamp(((DUAL_MAX_HEIGHT - 20 - progressW.y) / 275.0) * (0.5+DUAL_DENSITY),0.0,1.0);
|
||||
float distantfade = 1- exp( -10*pow(clamp(1.0 - length(progressW - cameraPosition)/(32*65),0.0,1.0),2));
|
||||
vec3 cloudlighting = DoCloudLighting(muE, cumulus, SkyLightColor, skyScatter, directLight, directScattering*sh2, directMultiScattering*sh2, 1);
|
||||
|
||||
color += max(cloudlighting - cloudlighting*exp(-muE*dd*dL),0.0) * absorbance;
|
||||
absorbance *= max(exp(-muE*dd*dL),0.0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (min(dot(absorbance,vec3(0.335)),1.0) < 1e-5) break;
|
||||
if (absorbance < 1e-5) break;
|
||||
}
|
||||
return vec4(color, min(dot(absorbance,vec3(0.335)),1.0));
|
||||
}
|
||||
// return vec4(color, dot(absorbance,vec3(0.21, 0.72, 0.07)));
|
||||
return vec4(color, absorbance);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// vec4 GetVolumetricFog(
|
||||
// vec3 viewPosition,
|
||||
// vec2 dither,
|
||||
// vec3 LightColor,
|
||||
// vec3 AmbientColor
|
||||
// ){
|
||||
|
||||
// #ifndef TOGGLE_VL_FOG
|
||||
// return vec4(0.0,0.0,0.0,1.0);
|
||||
// #endif
|
||||
// int SAMPLECOUNT = VL_SAMPLES;
|
||||
// /// ------------- RAYMARCHING STUFF ------------- \\\
|
||||
|
||||
// //project pixel position into projected shadowmap space
|
||||
|
||||
// vec3 wpos = mat3(gbufferModelViewInverse) * viewPosition + gbufferModelViewInverse[3].xyz;
|
||||
// vec3 fragposition = mat3(shadowModelView) * wpos + shadowModelView[3].xyz;
|
||||
// fragposition = diagonal3(shadowProjection) * fragposition + shadowProjection[3].xyz;
|
||||
|
||||
// //project view origin into projected shadowmap space
|
||||
// vec3 start = toShadowSpaceProjected(vec3(0.0));
|
||||
|
||||
// //rayvector into projected shadow map space
|
||||
// //we can use a projected vector because its orthographic projection
|
||||
// //however we still have to send it to curved shadow map space every step
|
||||
// vec3 dV = fragposition - start;
|
||||
// vec3 dVWorld = (wpos-gbufferModelViewInverse[3].xyz);
|
||||
|
||||
// #ifdef DISTANT_HORIZONS
|
||||
// float maxLength = min(length(dVWorld), max(dhFarPlane-1000,0.0))/length(dVWorld);
|
||||
// SAMPLECOUNT += SAMPLECOUNT;
|
||||
// #else
|
||||
// float maxLength = min(length(dVWorld), far)/length(dVWorld);
|
||||
// #endif
|
||||
|
||||
// dV *= maxLength;
|
||||
// dVWorld *= maxLength;
|
||||
|
||||
// float dL = length(dVWorld);
|
||||
// float mult = length(dVWorld)/25;
|
||||
|
||||
// vec3 progress = start.xyz;
|
||||
// vec3 progressW = gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
|
||||
// vec3 WsunVec = mat3(gbufferModelViewInverse) * sunVec * lightCol.a;
|
||||
// float SdotV = dot(sunVec,normalize(viewPosition))*lightCol.a;
|
||||
|
||||
|
||||
// /// ------------- COLOR/LIGHTING STUFF ------------- \\\
|
||||
|
||||
// vec3 color = vec3(0.0);
|
||||
// vec3 absorbance = vec3(1.0);
|
||||
|
||||
// ///// ----- fog lighting
|
||||
// //Mie phase + somewhat simulates multiple scattering (Horizon zero down cloud approx)
|
||||
// float mie = fogPhase(SdotV) * 5.0;
|
||||
// float rayL = phaseRayleigh(SdotV);
|
||||
|
||||
// vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5);
|
||||
// vec3 mC = vec3(fog_coefficientMieR*1e-6, fog_coefficientMieG*1e-6, fog_coefficientMieB*1e-6);
|
||||
|
||||
// vec3 skyLightPhased = AmbientColor;
|
||||
// vec3 LightSourcePhased = LightColor;
|
||||
|
||||
// #ifdef ambientLight_only
|
||||
// LightSourcePhased = vec3(0.0);
|
||||
// #endif
|
||||
// #ifdef PER_BIOME_ENVIRONMENT
|
||||
// vec3 biomeDirect = LightSourcePhased;
|
||||
// vec3 biomeIndirect = skyLightPhased;
|
||||
// float inBiome = BiomeVLFogColors(biomeDirect, biomeIndirect);
|
||||
// #endif
|
||||
|
||||
// skyLightPhased = max(skyLightPhased + skyLightPhased*(normalize(wpos).y*0.9+0.1),0.0);
|
||||
// LightSourcePhased *= mie;
|
||||
|
||||
// // float lightleakfix = clamp(pow(eyeBrightnessSmooth.y/240.,2) ,0.0,1.0);
|
||||
|
||||
// float lightleakfix = 1.0 - caveDetection;
|
||||
|
||||
// #ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||
// vec3 SkyLightColor = AmbientColor;
|
||||
// vec3 LightSourceColor = LightColor;
|
||||
|
||||
// #ifdef ambientLight_only
|
||||
// LightSourceColor = vec3(0.0);
|
||||
// #endif
|
||||
|
||||
// float shadowStep = 200.0;
|
||||
|
||||
// vec3 dV_Sun = WsunVec*shadowStep;
|
||||
|
||||
// float mieDay = phaseg(SdotV, 0.75);
|
||||
// float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5) ;
|
||||
|
||||
// vec3 directScattering = LightSourceColor * mieDay * 3.14;
|
||||
// vec3 directMultiScattering = LightSourceColor * mieDayMulti * 3.14;
|
||||
|
||||
// vec3 sunIndirectScattering = LightSourceColor * phaseg(dot(mat3(gbufferModelView)*vec3(0,1,0),normalize(viewPosition)), 0.5) * 3.14;
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifdef DISTANT_HORIZONS
|
||||
// float atmosphereMult = 1.0;
|
||||
// #else
|
||||
// float atmosphereMult = 1.5;
|
||||
// #endif
|
||||
|
||||
// float expFactor = 11.0;
|
||||
// for (int i=0;i<SAMPLECOUNT;i++) {
|
||||
// float d = (pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT))/expFactor - 1.0/expFactor)/(1-1.0/expFactor);
|
||||
// float dd = pow(expFactor, float(i+dither.x)/float(SAMPLECOUNT)) * log(expFactor) / float(SAMPLECOUNT)/(expFactor-1.0);
|
||||
// progress = start.xyz + d*dV;
|
||||
// progressW = gbufferModelViewInverse[3].xyz+cameraPosition + d*dVWorld;
|
||||
|
||||
// // float curvature = 1-exp(-25*pow(clamp(1.0 - length(progressW - cameraPosition)/(32*80),0.0,1.0),2));
|
||||
|
||||
// //project into biased shadowmap space
|
||||
// #ifdef DISTORT_SHADOWMAP
|
||||
// float distortFactor = calcDistort(progress.xy);
|
||||
// #else
|
||||
// float distortFactor = 1.0;
|
||||
// #endif
|
||||
// vec3 pos = vec3(progress.xy*distortFactor, progress.z);
|
||||
|
||||
// vec3 sh = vec3(1.0);
|
||||
|
||||
// if (abs(pos.x) < 1.0-0.5/2048. && abs(pos.y) < 1.0-0.5/2048){
|
||||
// pos = pos*vec3(0.5,0.5,0.5/6.0)+0.5;
|
||||
|
||||
// #ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
// sh = vec3(shadow2D(shadowtex0, pos).x);
|
||||
|
||||
// if(shadow2D(shadowtex1, pos).x > pos.z && sh.x < 1.0){
|
||||
// vec4 translucentShadow = texture2D(shadowcolor0, pos.xy);
|
||||
// if(translucentShadow.a < 0.9) sh = normalize(translucentShadow.rgb+0.0001);
|
||||
// }
|
||||
// #else
|
||||
// sh = vec3(shadow2D(shadow, pos).x);
|
||||
// #endif
|
||||
|
||||
// }
|
||||
// vec3 sh2 = sh;
|
||||
|
||||
// #ifdef VL_CLOUDS_SHADOWS
|
||||
// // if(clamp(progressW.y - CloudLayer1_height,0.0,1.0) < 1.0 && clamp(progressW.y-50,0.0,1.0) > 0.0)
|
||||
// sh *= GetCloudShadow_VLFOG(progressW, WsunVec);
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifdef PER_BIOME_ENVIRONMENT
|
||||
// float maxDistance = inBiome * min(max(1.0 - length(d*dVWorld.xz)/(32*8),0.0)*2.0,1.0);
|
||||
// float densityVol = cloudVol(progressW, maxDistance) * lightleakfix;
|
||||
// #else
|
||||
// float densityVol = cloudVol(progressW, 0.0) * lightleakfix;
|
||||
// #endif
|
||||
|
||||
// //Water droplets(fog)
|
||||
// float density = densityVol*300.0;
|
||||
|
||||
// ///// ----- main fog lighting
|
||||
|
||||
// //Just air
|
||||
// vec2 airCoef = exp(-max(progressW.y - SEA_LEVEL, 0.0) / vec2(8.0e3, 1.2e3) * vec2(6.,7.0)) * (atmosphereMult * 24.0) * Haze_amount * clamp(CloudLayer0_height - progressW.y + max(eyeAltitude-(CloudLayer0_height-50),0),0.0,1.0);
|
||||
|
||||
// //Pbr for air, yolo mix between mie and rayleigh for water droplets
|
||||
// vec3 rL = rC*airCoef.x;
|
||||
// vec3 m = (airCoef.y+density) * mC;
|
||||
|
||||
// #ifdef PER_BIOME_ENVIRONMENT
|
||||
// vec3 Atmosphere = mix(skyLightPhased, biomeDirect, maxDistance) * (rL + m); // not pbr so just make the atmosphere also dense fog heh
|
||||
// vec3 DirectLight = mix(LightSourcePhased, biomeIndirect, maxDistance) * sh * (rL*rayL + m);
|
||||
// #else
|
||||
// vec3 Atmosphere = skyLightPhased * (rL + m); // not pbr so just make the atmosphere also dense fog heh
|
||||
// vec3 DirectLight = LightSourcePhased * sh * (rL*rayL + m);
|
||||
// #endif
|
||||
// vec3 Lightning = Iris_Lightningflash_VLfog(progressW-cameraPosition, lightningBoltPosition.xyz) * (rL + m);
|
||||
|
||||
// vec3 foglighting = (Atmosphere + DirectLight + Lightning) * lightleakfix;
|
||||
|
||||
|
||||
|
||||
// color += (foglighting - foglighting * exp(-(rL+m)*dd*dL)) / ((rL+m)+0.00000001)*absorbance;
|
||||
// absorbance *= clamp(exp(-(rL+m)*dd*dL),0.0,1.0);
|
||||
|
||||
// #ifdef RAYMARCH_CLOUDS_WITH_FOG
|
||||
// //////////////////////////////////////////
|
||||
// ///// ----- cloud part
|
||||
// //////////////////////////////////////////
|
||||
// // curvature = clamp(1.0 - length(progressW - cameraPosition)/(32*128),0.0,1.0);
|
||||
|
||||
|
||||
// float otherlayer = max(progressW.y - (CloudLayer0_height+99.5), 0.0) > 0.0 ? 0.0 : 1.0;
|
||||
|
||||
// float DUAL_MIN_HEIGHT = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
|
||||
// float DUAL_MAX_HEIGHT = DUAL_MIN_HEIGHT + 100.0;
|
||||
|
||||
// float DUAL_DENSITY = otherlayer > 0.0 ? CloudLayer0_density : CloudLayer1_density;
|
||||
|
||||
// if(clamp(progressW.y - DUAL_MAX_HEIGHT,0.0,1.0) < 1.0 && clamp(progressW.y - DUAL_MIN_HEIGHT,0.0,1.0) > 0.0){
|
||||
|
||||
// float DUAL_MIN_HEIGHT_2 = otherlayer > 0.0 ? CloudLayer0_height : CloudLayer1_height;
|
||||
// float DUAL_MAX_HEIGHT_2 = DUAL_MIN_HEIGHT + 100.0;
|
||||
|
||||
// float cumulus = GetCumulusDensity(-1, progressW, 1, CloudLayer0_height, CloudLayer1_height);
|
||||
// float fadedDensity = DUAL_DENSITY * clamp(exp( (progressW.y - (DUAL_MAX_HEIGHT - 75)) / 9.0 ),0.0,1.0);
|
||||
|
||||
// float muE = cumulus*fadedDensity;
|
||||
// float directLight = 0.0;
|
||||
// for (int j=0; j < 3; j++){
|
||||
// vec3 shadowSamplePos = progressW + dV_Sun * (0.1 + j * (0.1 + dither.y*0.05));
|
||||
// float shadow = GetCumulusDensity(-1, shadowSamplePos, 0, DUAL_MIN_HEIGHT, DUAL_MAX_HEIGHT) * DUAL_DENSITY;
|
||||
|
||||
// directLight += shadow;
|
||||
// }
|
||||
|
||||
// /// shadows cast from one layer to another
|
||||
// /// large cumulus -> small cumulus
|
||||
// #if defined CloudLayer1 && defined CloudLayer0
|
||||
// if(otherlayer > 0.0) directLight += LAYER1_DENSITY * 2.0 * GetCumulusDensity(1, progressW + dV_Sun/abs(dV_Sun.y) * max((LAYER1_minHEIGHT+70*dither.y) - progressW.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT);
|
||||
// #endif
|
||||
// // // altostratus -> cumulus
|
||||
// // #ifdef CloudLayer2
|
||||
// // vec3 HighAlt_shadowPos = rayProgress + dV_Sun/abs(dV_Sun.y) * max(LAYER2_HEIGHT - rayProgress.y,0.0);
|
||||
// // float HighAlt_shadow = GetAltostratusDensity(HighAlt_shadowPos) * CloudLayer2_density;
|
||||
// // directLight += HighAlt_shadow;
|
||||
// // #endif
|
||||
|
||||
|
||||
// float skyScatter = clamp(((DUAL_MAX_HEIGHT - 20 - progressW.y) / 275.0) * (0.5+DUAL_DENSITY),0.0,1.0);
|
||||
// float distantfade = 1- exp( -10*pow(clamp(1.0 - length(progressW - cameraPosition)/(32*65),0.0,1.0),2));
|
||||
// vec3 cloudlighting = DoCloudLighting(cloudDensity * cumulus, SkyLightColor, skyScatter, directLight, directScattering*sh2, directMultiScattering*sh2, 1);
|
||||
|
||||
// color += max(cloudlighting - cloudlighting*exp(-muE*dd*dL),0.0) * absorbance;
|
||||
// absorbance *= max(exp(-muE*dd*dL),0.0);
|
||||
// }
|
||||
|
||||
// #endif
|
||||
|
||||
// if (min(dot(absorbance,vec3(0.335)),1.0) < 1e-5) break;
|
||||
// }
|
||||
// return vec4(color, min(dot(absorbance,vec3(0.335)),1.0));
|
||||
// }
|
@ -167,15 +167,19 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
|
||||
#define FOG_START_HEIGHT 60 // [-200 -190 -180 -170 -160 -150 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200]
|
||||
|
||||
#define TOD_Fog_mult 1.0 // [0.0 0.25 0.5 0.75 1.0 2.0 3.0 4.0 5.0 10.0 15.0 20.0 25.0 50.0 75.0 100.0]
|
||||
#define Morning_Uniform_Fog 1.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Noon_Uniform_Fog 0.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Evening_Uniform_Fog 3.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Night_Uniform_Fog 5.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Morning_Cloudy_Fog 10.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Noon_Cloudy_Fog 0.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Evening_Cloudy_Fog 1.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define Night_Cloudy_Fog 5.0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define TOD_Fog_mult 1.0 // [0.00 0.25 0.50 0.75 1.0 1.25 1.50 1.75 2.00 3.00 4.00 5.00]
|
||||
|
||||
#define Morning_Uniform_Fog 0.01 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define Morning_Cloudy_Fog 0.05 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define Noon_Uniform_Fog 0.0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define Noon_Cloudy_Fog 0.0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define Evening_Uniform_Fog 0.05 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define Evening_Cloudy_Fog 0.0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define Night_Uniform_Fog 0.2 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define Night_Cloudy_Fog 0.05 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define Haze_amount 1.0 // [0.0 0.2 0.4 0.6 0.8 1.0 1.25 1.5 1.75 2.0 3.0 4.0 5.0]
|
||||
#define fog_coefficientRayleighR 5.8 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
|
||||
@ -185,7 +189,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
#define fog_coefficientMieG 3.0 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
|
||||
#define fog_coefficientMieB 3.0 // [0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0]
|
||||
|
||||
#define RainFog_amount 3 // [0 1 2 3 4 5 6 7 8 9 10 15 20 25]
|
||||
#define RainFog_amount 0.1 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define BLOOMY_FOG 1.5 // [0.0 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0 3.0 4.0 6.0 10.0 15.0 20.0]
|
||||
#define BLOOM_STRENGTH 1.0 // [0.0 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 50.0 75.0 100.0]
|
||||
@ -217,26 +221,28 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
#define PER_BIOME_ENVIRONMENT
|
||||
|
||||
#define SWAMP_ENV
|
||||
#define SWAMP_UNIFORM_DENSITY 50 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define SWAMP_CLOUDY_DENSITY 0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define SWAMP_UNIFORM_DENSITY 0.3 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define SWAMP_CLOUDY_DENSITY 0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define SWAMP_R 0.15 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define SWAMP_G 0.25 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define SWAMP_B 0.05 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define JUNGLE_ENV
|
||||
#define JUNGLE_UNIFORM_DENSITY 10 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define JUNGLE_CLOUDY_DENSITY 150 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define JUNGLE_UNIFORM_DENSITY 0.1 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define JUNGLE_CLOUDY_DENSITY 0.2 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define JUNGLE_R 0.5 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define JUNGLE_G 1.0 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define JUNGLE_B 0.5 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define DARKFOREST_ENV
|
||||
#define DARKFOREST_UNIFORM_DENSITY 15 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define DARKFOREST_CLOUDY_DENSITY 0 // [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 75.0 100.0 125.0 150.0 175.0 200.0 255.]
|
||||
#define DARKFOREST_UNIFORM_DENSITY 0.1 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define DARKFOREST_CLOUDY_DENSITY 0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define DARKFOREST_R 0.3 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define DARKFOREST_G 0.4 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
#define DARKFOREST_B 1.0 // [0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0]
|
||||
|
||||
#define SNOW_STORMS
|
||||
#define SAND_STORMS
|
||||
|
||||
// i have to do this so it shows up in the menu lmao
|
||||
#ifdef SWAMP_ENV
|
||||
@ -245,6 +251,10 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
#endif
|
||||
#ifdef DARKFOREST_ENV
|
||||
#endif
|
||||
#ifdef SNOW_STORMS
|
||||
#endif
|
||||
#ifdef SAND_STORMS
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// ----- LABPBR MATERIALS RELATED SETTINGS ----- //
|
||||
@ -275,12 +285,6 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
#define MAX_ITERATIONS 35 // [5 10 15 20 25 30 40 50 60 70 80 90 100 125 150 200 400]
|
||||
#define MAX_DIST 25.0 // [5.0 10.0 15.0 20.0 25.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 125.0 150.0 200.0 400.0]
|
||||
|
||||
// #define HEIGTHMAP_DEPTH_OFFSET
|
||||
|
||||
#ifdef POM
|
||||
#undef HEIGTHMAP_DEPTH_OFFSET
|
||||
#endif
|
||||
|
||||
#define SSS_TYPE 1 // [0 1 2 3]
|
||||
#define LabSSS_Curve 1.0 // [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 ]
|
||||
// #define MOB_SSS
|
||||
@ -322,7 +326,7 @@ const float entityShadowDistanceMul = 0.25; // [0.01 0.02 0.03 0.04 0.05 0.10 0.
|
||||
#define sunColorG 0.91 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
#define sunColorB 0.81 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
|
||||
#define moon_illuminance 200.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0 2000.0 3000.0 4000.0 5000.0 6000.0 7000.0 8000.0 9000.0 10000.0 11000.0 12000.0 13000.0 14000.0 15000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 150000.0 200000.0 250000.0 300000.0 400000.0 500000.0]
|
||||
#define moon_illuminance 50.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0 2000.0 3000.0 4000.0 5000.0 6000.0 7000.0 8000.0 9000.0 10000.0 11000.0 12000.0 13000.0 14000.0 15000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 150000.0 200000.0 250000.0 300000.0 400000.0 500000.0]
|
||||
#define Moon_temp 15000 // [1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 5100 5200 5300 4500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 15000 20000 25000 50000]
|
||||
#define moonColorR 0.9080 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
#define moonColorG 0.9121 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
@ -406,100 +410,100 @@ uniform int moonPhase;
|
||||
|
||||
#define HQ_CLOUDS
|
||||
|
||||
// #define Daily_Weather
|
||||
#define Daily_Weather
|
||||
// #define CHOOSE_RANDOM_WEATHER_PROFILE
|
||||
|
||||
#ifdef Daily_Weather
|
||||
// DAY 0 WEATHER PARAMETERS
|
||||
#define DAY0_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l0_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY0_l1_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY0_l2_coverage 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY0_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l0_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l1_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_l2_density 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY0_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 1 WEATHER PARAMETERS
|
||||
#define DAY1_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l0_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY1_l1_coverage 1.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY1_l2_coverage 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY1_ufog_density 0.01 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l0_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l1_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_l2_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY1_cfog_density 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 2 WEATHER PARAMETERS
|
||||
#define DAY2_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l0_coverage 0.9 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY2_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY2_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY2_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l0_density 0.25 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY2_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 3 WEATHER PARAMETERS
|
||||
#define DAY3_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l0_coverage 0.8 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY3_l1_coverage 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY3_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY3_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l0_density 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l1_density 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY3_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 4 WEATHER PARAMETERS
|
||||
#define DAY4_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY4_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY4_l2_coverage 0.6 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY4_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_l2_density 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY4_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 5 WEATHER PARAMETERS
|
||||
#define DAY5_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l0_coverage 0.8 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY5_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY5_l2_coverage 1.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY5_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l0_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_l2_density 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY5_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 6 WEATHER PARAMETERS
|
||||
#define DAY6_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY6_l1_coverage 0.8 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY6_l2_coverage 1.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY6_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l1_density 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_l2_density 0.02 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY6_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 7 WEATHER PARAMETERS
|
||||
#define DAY7_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY7_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY7_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY7_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY7_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 8 WEATHER PARAMETERS
|
||||
#define DAY8_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l0_coverage 0.6 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY8_l1_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY8_l2_coverage 0.3 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY8_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l0_density 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l1_density 0.5 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_l2_density 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY8_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
// DAY 9 WEATHER PARAMETERS
|
||||
#define DAY9_l0_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l2_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l0_coverage 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY9_l1_coverage 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY9_l2_coverage 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
#define DAY9_ufog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l0_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l0_density 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l1_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l2_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_cfog_density 0.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_l2_density 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#define DAY9_cfog_density 1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||
#endif
|
||||
|
||||
|
||||
@ -522,7 +526,7 @@ uniform int moonPhase;
|
||||
|
||||
#define DOF_QUALITY -1 // [-1 0 1 2 3 4 5]
|
||||
#define DOF_ANAMORPHIC_RATIO 1.0 // [0.3 0.6 1.0]
|
||||
// // #define AUTOFOCUS
|
||||
|
||||
//#define FAR_BLUR_ONLY
|
||||
#define focal 2.4 // [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2.0 2.05 2.1 2.15 2.2 2.25 2.3 2.35 2.4 2.45 2.5 2.55 2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95 3.0 3.05 3.1 3.15 3.2 3.25 3.3 3.35 3.4 3.45 3.5 3.55 3.6 3.65 3.7 3.75 3.8 3.85 3.9 3.95 4.0 4.05 4.1 4.15 4.2 4.25 4.3 4.35 4.4 4.45 4.5 4.55 4.6 4.65 4.7 4.75 4.8 4.85 4.9 4.95 5.0 5.05 5.1 5.15 5.2 5.25 5.3 5.35 5.4 5.45 5.5 5.55 5.6 5.65 5.7 5.75 5.8 5.85 5.9 5.95 6.0 6.05 6.1 6.15 6.2 6.25 6.3 6.35 6.4 6.45 6.5 6.55 6.6 6.65 6.7 6.75 6.8 6.85 6.9 6.95 7.0 7.05 7.1 7.15 7.2 7.25 7.3 7.35 7.4 7.45 7.5 7.55 7.6 7.65 7.7 7.75 7.8 7.85 7.9 7.95 8.0 8.05 8.1 8.15 8.2 8.25 8.3 8.35 8.4 8.45 8.5 8.55 8.6 8.65 8.7 8.75 8.8 8.85 8.9 8.95 9.0 9.05 9.1 9.15 9.2 9.25 9.3 9.35 9.4 9.45 9.5 9.55 9.6 9.65 9.7 9.75 9.8 9.85 9.9 9.95 ]
|
||||
#define aperture 0.8 // [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2.0 2.05 2.1 2.15 2.2 2.25 2.3 2.35 2.4 2.45 2.5 2.55 2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95 3.0 3.05 3.1 3.15 3.2 3.25 3.3 3.35 3.4 3.45 3.5 3.55 3.6 3.65 3.7 3.75 3.8 3.85 3.9 3.95 4.0 4.05 4.1 4.15 4.2 4.25 4.3 4.35 4.4 4.45 4.5 4.55 4.6 4.65 4.7 4.75 4.8 4.85 4.9 4.95 5.0 5.05 5.1 5.15 5.2 5.25 5.3 5.35 5.4 5.45 5.5 5.55 5.6 5.65 5.7 5.75 5.8 5.85 5.9 5.95 6.0 6.05 6.1 6.15 6.2 6.25 6.3 6.35 6.4 6.45 6.5 6.55 6.6 6.65 6.7 6.75 6.8 6.85 6.9 6.95 7.0 7.05 7.1 7.15 7.2 7.25 7.3 7.35 7.4 7.45 7.5 7.55 7.6 7.65 7.7 7.75 7.8 7.85 7.9 7.95 8.0 8.05 8.1 8.15 8.2 8.25 8.3 8.35 8.4 8.45 8.5 8.55 8.6 8.65 8.7 8.75 8.8 8.85 8.9 8.95 9.0 9.05 9.1 9.15 9.2 9.25 9.3 9.35 9.4 9.45 9.5 9.55 9.6 9.65 9.7 9.75 9.8 9.85 9.9 9.95 ]
|
||||
@ -591,9 +595,11 @@ const vec3 HIGHLIGHTS_TARGET = length(vec3(HIGHLIGHTS_GRADE_R, HIGHLIGHTS_GRADE_
|
||||
const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
|
||||
|
||||
//#define BICUBIC_UPSCALING
|
||||
|
||||
// #define CAMERA_GRIDLINES
|
||||
|
||||
// #define MOTION_BLUR
|
||||
#define MOTION_BLUR_STRENGTH 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// ----- GAMEPLAY POST EFFECT RELATED SETTINGS ----- //
|
||||
///////////////////////////////////////////////////////
|
||||
@ -663,7 +669,6 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
|
||||
#define LIT_PARTICLE_BRIGHTNESS 1.0 // [1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 100.]
|
||||
|
||||
|
||||
#define SELECT_BOX
|
||||
|
||||
#define LIGHTNING_FLASH // FOR OPTIFINE USERS. some mods change the sky color, which can trigger the lightning flash detection.
|
||||
@ -699,10 +704,12 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#endif
|
||||
|
||||
// #define DH_SHADOWPROJECTIONTWEAK
|
||||
|
||||
#define DH_OVERDRAW_PREVENTION
|
||||
#define DH_KNOWN_ISSUES 0 // [0 1 2 3 4 5]
|
||||
#define OVERDRAW_MAX_DISTANCE 0 // [0 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256]
|
||||
|
||||
#define DH_AMBIENT_OCCLUSION
|
||||
#define DH_SUBSURFACE_SCATTERING
|
||||
#define DH_SCREENSPACE_REFLECTIONS
|
||||
|
||||
///////////////////////////////////////////
|
||||
// ----- FLOODFILL [LPV] SETTINGS ----- //
|
||||
@ -752,9 +759,14 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
// #define BLOOMY_PARTICLES
|
||||
// #define ORIGINAL_CHOCAPIC_SKY
|
||||
// #define CLOUDS_INFRONT_OF_WORLD
|
||||
// #define LARGE_WAVE_DISPLACEMENT
|
||||
|
||||
|
||||
// fix settings
|
||||
#ifdef DH_SCREENSPACE_REFLECTIONS
|
||||
#endif
|
||||
#ifdef DH_SUBSURFACE_SCATTERING
|
||||
#endif
|
||||
#ifdef TRANSLUCENT_ENTITIES
|
||||
#endif
|
||||
#ifdef RENDER_ENTITY_SHADOWS
|
||||
|
@ -109,7 +109,7 @@ vec4 texture2D_bicubic_offset(sampler2D tex, vec2 uv, float noise, float scale)
|
||||
#endif
|
||||
|
||||
vec4 texelSize = vec4(texelSize,1.0/texelSize);
|
||||
uv = uv*texelSize.zw;
|
||||
uv = (uv + texelSize.xy)*texelSize.zw;
|
||||
|
||||
vec2 iuv = floor( uv + circleOffsets );
|
||||
vec2 fuv = fract( uv + circleOffsets );
|
||||
|
@ -229,7 +229,7 @@ void DoSpecularReflections(
|
||||
#ifdef Sky_reflection
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTexLOD(L, colortex4, sqrt(Roughness) * 9.0).rgb / 30.0) * Metals;
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTexLOD(L, colortex4, sqrt(Roughness) * 9.0).rgb / 30.0) * Metals ;
|
||||
#else
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTexLOD2(L, colortex4, sqrt(Roughness) * 6.0).rgb / 30.0) * Metals;
|
||||
#endif
|
||||
|
@ -24,23 +24,27 @@ uniform int worldTime;
|
||||
vec4 dailyWeatherParams1 = vec4(CloudLayer0_density, CloudLayer1_density, CloudLayer2_density, 0.0);
|
||||
#endif
|
||||
|
||||
float LAYER0_width = 100.0;
|
||||
float LAYER0_minHEIGHT = CloudLayer0_height;
|
||||
float LAYER0_maxHEIGHT = 100 + LAYER0_minHEIGHT;
|
||||
float LAYER0_maxHEIGHT = LAYER0_width + LAYER0_minHEIGHT;
|
||||
|
||||
float LAYER1_minHEIGHT = max(CloudLayer1_height,LAYER0_maxHEIGHT);
|
||||
float LAYER1_maxHEIGHT = 100 + LAYER1_minHEIGHT;
|
||||
float LAYER1_width = 100.0;
|
||||
float LAYER1_minHEIGHT = max(CloudLayer1_height, LAYER0_maxHEIGHT);
|
||||
float LAYER1_maxHEIGHT = LAYER1_width + LAYER1_minHEIGHT;
|
||||
|
||||
float LAYER2_HEIGHT = max(CloudLayer2_height,LAYER1_maxHEIGHT);
|
||||
float LAYER2_HEIGHT = max(CloudLayer2_height, LAYER1_maxHEIGHT);
|
||||
|
||||
float LAYER0_COVERAGE = dailyWeatherParams0.x;
|
||||
float LAYER1_COVERAGE = dailyWeatherParams0.y;
|
||||
float LAYER2_COVERAGE = dailyWeatherParams0.z;
|
||||
// float LAYER0_COVERAGE = mix(pow(dailyWeatherParams0.x*2.0,0.2), 0.9, rainStrength);
|
||||
// float LAYER1_COVERAGE = mix(pow(dailyWeatherParams0.y*2.0,0.2), 0.8, rainStrength);
|
||||
// float LAYER2_COVERAGE = mix(pow(dailyWeatherParams0.z*2.0,0.2), 1.3, rainStrength);
|
||||
|
||||
float LAYER0_DENSITY = dailyWeatherParams1.x;
|
||||
float LAYER1_DENSITY = dailyWeatherParams1.y;
|
||||
float LAYER2_DENSITY = dailyWeatherParams1.z;
|
||||
float LAYER0_COVERAGE = mix(dailyWeatherParams0.x, 0.95, rainStrength);
|
||||
float LAYER1_COVERAGE = mix(dailyWeatherParams0.y, 0.0, rainStrength);
|
||||
float LAYER2_COVERAGE = mix(dailyWeatherParams0.z, 1.5, rainStrength);
|
||||
|
||||
float rainCloudwetness = rainStrength;
|
||||
float LAYER0_DENSITY = mix(dailyWeatherParams1.x,1.0,rainStrength);
|
||||
float LAYER1_DENSITY = mix(dailyWeatherParams1.y,0.0,rainStrength);
|
||||
float LAYER2_DENSITY = mix(dailyWeatherParams1.z,0.05,rainStrength);
|
||||
|
||||
uniform int worldDay;
|
||||
|
||||
@ -64,25 +68,14 @@ float densityAtPos(in vec3 pos){
|
||||
|
||||
float GetAltostratusDensity(vec3 pos){
|
||||
|
||||
float Coverage; float Density;
|
||||
|
||||
float large = texture2D(noisetex, (pos.xz + cloud_movement)/100000. ).b;
|
||||
float small = texture2D(noisetex, (pos.xz - cloud_movement)/10000. - vec2(-large,1-large)/5).b;
|
||||
large = max(large + LAYER2_COVERAGE - 0.5, 0.0);
|
||||
// float shape = (small + pow((1.0-large),2.0))/2.0;
|
||||
float large = 1.0 - texture2D(noisetex, (pos.xz + cloud_movement)/100000.).b;
|
||||
large = max(large + LAYER2_COVERAGE - 0.7, 0.0);
|
||||
|
||||
float weight = 0.7;
|
||||
float shape = max( large*weight - small*(1.0-weight) ,0.0);
|
||||
shape *= shape;
|
||||
float medium = 1.0 - texture2D(noisetex, (pos.xz - cloud_movement)/7500. + vec2(-large,1.0-large)/5.0).b;
|
||||
|
||||
float shape = max(large - medium*0.4 * clamp(1.5-large,0.0,1.0),0.0);
|
||||
|
||||
|
||||
// infinite vertical height will mess with lighting, so get rid of it.
|
||||
// shape = max(shape - pow(abs(LAYER2_HEIGHT - pos.y)/20,1.5), 0.0);
|
||||
shape = min(min(shape , clamp((LAYER2_HEIGHT + 15) - pos.y,0,1)), 1.0 - clamp(LAYER2_HEIGHT - pos.y,0,1));
|
||||
|
||||
|
||||
return shape;
|
||||
return shape*shape;
|
||||
}
|
||||
|
||||
float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float maxHeight){
|
||||
@ -95,8 +88,13 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
|
||||
// curvature = clamp(1.0 - length(pos - cameraPosition)/(32*128),0.0,1.0);
|
||||
float LAYER0_minHEIGHT_FOG = CloudLayer0_height;
|
||||
float LAYER0_maxHEIGHT_FOG = 100 + LAYER0_minHEIGHT_FOG;
|
||||
LAYER0_minHEIGHT_FOG = LAYER0_minHEIGHT;
|
||||
LAYER0_maxHEIGHT_FOG = LAYER0_maxHEIGHT;
|
||||
|
||||
float LAYER1_minHEIGHT_FOG = max(CloudLayer1_height, LAYER0_maxHEIGHT);
|
||||
float LAYER1_maxHEIGHT_FOG = 100 + LAYER1_minHEIGHT_FOG;
|
||||
LAYER1_minHEIGHT_FOG = LAYER1_minHEIGHT;
|
||||
LAYER1_maxHEIGHT_FOG = LAYER1_maxHEIGHT;
|
||||
|
||||
|
||||
vec2 SampleCoords0 = vec2(0.0); vec2 SampleCoords1 = vec2(0.0);
|
||||
@ -132,26 +130,26 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
|
||||
if(layer == 0){
|
||||
coverage = abs(CloudLarge*2.0 - 1.2)*0.5 - (1.0-CloudSmall);
|
||||
|
||||
float layer0 = min(min(coverage + dailyWeatherParams0.x, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1));
|
||||
float layer0 = min(min(coverage + LAYER0_COVERAGE, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1));
|
||||
|
||||
Topshape = max(pos.y - (LAYER0_maxHEIGHT_FOG - 75),0.0) / 200.0;
|
||||
Topshape += max(pos.y - (LAYER0_maxHEIGHT_FOG - 10),0.0) / 15.0;
|
||||
Baseshape = max(LAYER0_minHEIGHT_FOG + 12.5 - pos.y, 0.0) / 50.0;
|
||||
|
||||
FinalCloudCoverage = max(layer0 - Topshape - Baseshape * rainStrength,0.0);
|
||||
FinalCloudCoverage = max(layer0 - Topshape - Baseshape * (1.0-rainStrength),0.0);
|
||||
}
|
||||
|
||||
if(layer == 1){
|
||||
|
||||
coverage = abs(CloudLarge-0.8) - CloudSmall;
|
||||
|
||||
float layer1 = min(min(coverage + dailyWeatherParams0.y - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1));
|
||||
float layer1 = min(min(coverage + LAYER1_COVERAGE - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1));
|
||||
|
||||
Topshape = max(pos.y - (LAYER1_maxHEIGHT_FOG - 75),0.0) / 200.0;
|
||||
Topshape += max(pos.y - (LAYER1_maxHEIGHT_FOG - 10), 0.0) / 15.0;
|
||||
Baseshape = max(LAYER1_minHEIGHT_FOG + 15.5 - pos.y, 0.0) / 50.0;
|
||||
|
||||
FinalCloudCoverage = max(layer1 - Topshape - Baseshape * rainStrength, 0.0);
|
||||
FinalCloudCoverage = max(layer1 - Topshape*Topshape - Baseshape * (1.0-rainStrength), 0.0);
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +159,7 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
|
||||
|
||||
#ifdef CloudLayer0
|
||||
float layer0_coverage = abs(CloudLarge*2.0 - 1.2)*0.5 - (1.0-CloudSmall);
|
||||
float layer0 = min(min(layer0_coverage + dailyWeatherParams0.x, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1));
|
||||
float layer0 = min(min(layer0_coverage + LAYER0_COVERAGE, clamp(LAYER0_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER0_minHEIGHT_FOG - pos.y,0,1));
|
||||
|
||||
Topshape = max(pos.y - (LAYER0_maxHEIGHT_FOG - 75),0.0) / 200.0;
|
||||
Topshape += max(pos.y - (LAYER0_maxHEIGHT_FOG - 10),0.0) / 50.0;
|
||||
@ -173,7 +171,7 @@ float cloudCov(int layer, in vec3 pos, vec3 samplePos, float minHeight, float ma
|
||||
|
||||
#ifdef CloudLayer1
|
||||
float layer1_coverage = abs(CloudLarge-0.8) - CloudSmall;
|
||||
float layer1 = min(min(layer1_coverage + dailyWeatherParams0.y - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1));
|
||||
float layer1 = min(min(layer1_coverage + LAYER1_COVERAGE - 0.5,clamp(LAYER1_maxHEIGHT_FOG - pos.y,0,1)), 1.0 - clamp(LAYER1_minHEIGHT_FOG - pos.y,0,1));
|
||||
|
||||
Topshape = max(pos.y - (LAYER1_maxHEIGHT_FOG - 75), 0.0) / 200;
|
||||
Topshape += max(pos.y - (LAYER1_maxHEIGHT_FOG - 10 ), 0.0) / 50;
|
||||
@ -202,9 +200,9 @@ float cloudVol(int layer, in vec3 pos, in vec3 samplePos, in float cov, in int L
|
||||
|
||||
samplePos.xz -= cloud_movement/4;
|
||||
|
||||
samplePos.xz += pow( max(pos.y - (minHeight+20), 0.0) / 20.0,1.50) * upperPlane;
|
||||
samplePos.xz += pow( max(pos.y - (minHeight+20), 0.0) / 20.0,1.50) ;
|
||||
|
||||
noise += (1.0-densityAtPos(samplePos * mix(100.0,200.0,upperPlane)) ) * sqrt(1.0-cov);
|
||||
noise += (1.0-densityAtPos(samplePos * mix(100.0,200.0,upperPlane)) ) * sqrt(1.0-cov);
|
||||
|
||||
if (LoD > 0){
|
||||
noise += abs( densityAtPos(samplePos * mix(450.0,600.0,upperPlane) ) - (1.0-clamp(((maxHeight - pos.y) / 100.0),0.0,1.0))) * 0.75 * (1.0-cov);
|
||||
@ -233,7 +231,6 @@ float GetCumulusDensity(int layer, in vec3 pos, in int LoD, float minHeight, flo
|
||||
#ifndef CLOUDSHADOWSONLY
|
||||
uniform sampler2D colortex4; //Skybox
|
||||
|
||||
|
||||
//Mie phase function
|
||||
float phaseg(float x, float g){
|
||||
float gg = g * g;
|
||||
@ -242,7 +239,6 @@ float phaseg(float x, float g){
|
||||
|
||||
vec3 DoCloudLighting(
|
||||
float density,
|
||||
float densityFaded,
|
||||
|
||||
vec3 skyLightCol,
|
||||
float skyScatter,
|
||||
@ -250,17 +246,20 @@ vec3 DoCloudLighting(
|
||||
float sunShadows,
|
||||
vec3 sunScatter,
|
||||
vec3 sunMultiScatter,
|
||||
float distantfog
|
||||
){
|
||||
float powder = 1.0 - exp(-5.0 * sqrt(density));
|
||||
|
||||
vec3 indirectLight = skyLightCol * mix(1.0, 1.0 - exp(-1.0 * (1.0-sqrt(density))), skyScatter*skyScatter*skyScatter * distantfog);
|
||||
float distantfog,
|
||||
|
||||
int layer
|
||||
){
|
||||
float powder = 1.0 - exp(-10.0 * density);
|
||||
vec3 directLight = sunMultiScatter * exp(-3.0 * sunShadows) * powder + sunScatter * exp(-10.0 * sunShadows);
|
||||
|
||||
// return indirectLight;
|
||||
vec3 indirectLight = skyLightCol * mix(1.0, 2.0 * (1.0 - sqrt((skyScatter*skyScatter*skyScatter)*density)) , pow(distantfog,1.0 - rainStrength*0.5));
|
||||
|
||||
// return directLight;
|
||||
return indirectLight + directLight;
|
||||
// #ifndef TEST
|
||||
// return indirectLight;
|
||||
// #endif
|
||||
return directLight + indirectLight;
|
||||
}
|
||||
|
||||
vec4 renderLayer(
|
||||
@ -314,20 +313,22 @@ if(layer == 2){
|
||||
|
||||
if(max(signFlip * normalize(dV_view).y,0.0) <= 0.0){
|
||||
float altostratus = GetAltostratusDensity(rayProgress);
|
||||
|
||||
float AltoWithDensity = altostratus * cloudDensity;
|
||||
|
||||
if(altostratus > 1e-5){
|
||||
float muE = altostratus * cloudDensity;
|
||||
|
||||
float directLight = 0.0;
|
||||
for (int j = 0; j < 2; j++){
|
||||
vec3 shadowSamplePos_high = rayProgress + dV_Sun * (100.0 + j * (20.0 + dither*10.0));
|
||||
// lower the step size as the sun gets higher in the sky
|
||||
vec3 shadowSamplePos_high = rayProgress + dV_Sun * (1.0 + j * dither) / (pow(abs(dV_Sun.y*0.5),3.0) * 0.995 + 0.005);
|
||||
|
||||
float shadow = GetAltostratusDensity(shadowSamplePos_high) * cloudDensity;
|
||||
directLight += shadow;
|
||||
// lower density as the sun gets higher in the sky to simulate.... multiscattering or something idk it looks better this way
|
||||
directLight += GetAltostratusDensity(shadowSamplePos_high) * cloudDensity * (1.0-abs(dV_Sun.y));
|
||||
}
|
||||
|
||||
float skyscatter_alto = sqrt(altostratus*0.05) * cloudDensity;
|
||||
vec3 lighting = DoCloudLighting(altostratus, 1.0, skyLightCol, skyscatter_alto, directLight, sunScatter, sunMultiScatter, distantfog);
|
||||
vec3 lighting = DoCloudLighting(AltoWithDensity, skyLightCol, 0.5, directLight, sunScatter, sunMultiScatter, distantfog, layer);
|
||||
|
||||
COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION;
|
||||
TOTAL_EXTINCTION *= max(exp(-mult*muE),0.0);
|
||||
@ -338,8 +339,8 @@ if(layer == 2){
|
||||
|
||||
}else{
|
||||
#if defined CloudLayer1 && defined CloudLayer0
|
||||
float upperLayerOcclusion = layer == 0 ? LAYER1_DENSITY *2* GetCumulusDensity(1, rayProgress + vec3(0.0,1.0,0.0) * max((LAYER1_minHEIGHT+30) - rayProgress.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT) : 0.0;
|
||||
float skylightOcclusion = max(exp2(-5.0 * (upperLayerOcclusion*upperLayerOcclusion)), 0.75 + (1.0-distantfog)*0.25);
|
||||
float upperLayerOcclusion = layer == 0 ? GetCumulusDensity(1, rayProgress + vec3(0.0,1.0,0.0) * max((LAYER1_minHEIGHT+30) - rayProgress.y,0.0), 0, LAYER1_minHEIGHT, LAYER1_maxHEIGHT) : 0.0;
|
||||
float skylightOcclusion = mix(1.0, (1.0 - LAYER1_DENSITY)*0.8 + 0.2, (1.0 - exp2(-5.0 * (upperLayerOcclusion*upperLayerOcclusion))) * distantfog);
|
||||
#else
|
||||
float skylightOcclusion = 1.0;
|
||||
#endif
|
||||
@ -356,15 +357,15 @@ if(layer == 2){
|
||||
if(clamp(rayProgress.y - maxHeight,0.0,1.0) < 1.0 && clamp(rayProgress.y - minHeight,0.0,1.0) > 0.0){
|
||||
|
||||
float cumulus = GetCumulusDensity(layer, rayProgress, 1, minHeight, maxHeight);
|
||||
float fadedDensity = cloudDensity * pow(clamp((rayProgress.y - minHeight)/25,0.0,1.0),2.0);
|
||||
float CumulusWithDensity = cloudDensity * cumulus;
|
||||
float fadedDensity = cloudDensity * clamp(exp( (rayProgress.y - (maxHeight - 75)) / 9.0 ),0.0,1.0);
|
||||
|
||||
if(CumulusWithDensity > 1e-5 ){ // make sure no work is done on pixels with no densities
|
||||
float muE = cumulus * fadedDensity;
|
||||
|
||||
float directLight = 0.0;
|
||||
for (int j=0; j < 3; j++){
|
||||
vec3 shadowSamplePos = rayProgress + dV_Sun * (20.0 + j * (20.0 + dither*10.0));
|
||||
vec3 shadowSamplePos = rayProgress + dV_Sun * (20.0 + j * (20.0 + dither*20.0));
|
||||
directLight += GetCumulusDensity(layer, shadowSamplePos, 0, minHeight, maxHeight) * cloudDensity;
|
||||
}
|
||||
|
||||
@ -376,12 +377,12 @@ if(layer == 2){
|
||||
// altostratus -> cumulus
|
||||
#ifdef CloudLayer2
|
||||
vec3 HighAlt_shadowPos = rayProgress + dV_Sun/abs(dV_Sun.y) * max(LAYER2_HEIGHT - rayProgress.y,0.0);
|
||||
float HighAlt_shadow = GetAltostratusDensity(HighAlt_shadowPos) * CloudLayer2_density;
|
||||
float HighAlt_shadow = GetAltostratusDensity(HighAlt_shadowPos) * CloudLayer2_density * (1.0-abs(WsunVec.y));
|
||||
directLight += HighAlt_shadow;
|
||||
#endif
|
||||
|
||||
float skyScatter = clamp(((maxHeight - rayProgress.y) / 100.0),0.0,1.0); // linear gradient from bottom to top of cloud layer
|
||||
vec3 lighting = DoCloudLighting(CumulusWithDensity, muE, skyLightCol * skylightOcclusion, skyScatter, directLight, sunScatter, sunMultiScatter, distantfog);
|
||||
vec3 lighting = DoCloudLighting(CumulusWithDensity, skyLightCol * skylightOcclusion, skyScatter, directLight, sunScatter, sunMultiScatter, distantfog, layer);
|
||||
|
||||
|
||||
COLOR += max(lighting - lighting*exp(-mult*muE),0.0) * TOTAL_EXTINCTION;
|
||||
@ -413,13 +414,14 @@ vec3 layerStartingPosition(
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
vec4 renderClouds(
|
||||
vec3 FragPosition,
|
||||
vec2 Dither,
|
||||
vec3 LightColor,
|
||||
vec3 SkyColor
|
||||
){
|
||||
vec3 SignedWsunvec = WsunVec;
|
||||
vec3 WsunVec = WsunVec * (float(sunElevation > 1e-5)*2.0-1.0);
|
||||
|
||||
#ifndef VOLUMETRIC_CLOUDS
|
||||
return vec4(0.0,0.0,0.0,1.0);
|
||||
@ -436,24 +438,23 @@ vec4 renderClouds(
|
||||
|
||||
//project pixel position into projected shadowmap space
|
||||
vec4 viewPos = normalize(gbufferModelViewInverse * vec4(FragPosition,1.0) );
|
||||
// maxIT_clouds = int(clamp(maxIT_clouds / sqrt(exp2(viewPos.y)),0.0, maxIT));
|
||||
maxIT_clouds = int(clamp(maxIT_clouds / sqrt(exp2(viewPos.y)),0.0, maxIT));
|
||||
// maxIT_clouds = 15;
|
||||
|
||||
vec3 dV_view = normalize(viewPos.xyz);
|
||||
vec3 dV_viewTEST = viewPos.xyz;
|
||||
|
||||
// this is the cloud curvature.
|
||||
dV_view.y += 0.025 * heightRelativeToClouds;
|
||||
|
||||
vec3 dV_view_Alto = dV_view;
|
||||
|
||||
dV_view_Alto *= 100/abs(dV_view_Alto.y)/15;
|
||||
dV_view_Alto *= 5.0/abs(dV_view_Alto.y);
|
||||
float mult_alto = length(dV_view_Alto);
|
||||
|
||||
dV_view *= 90/abs(dV_view.y)/maxIT_clouds;
|
||||
|
||||
float mult = length(dV_view);
|
||||
// dV_view *= (LAYER0_maxHEIGHT - LAYER0_minHEIGHT)/abs(dV_view.y)/maxIT_clouds;
|
||||
|
||||
vec3 dV_viewTEST = dV_view * (90.0/abs(dV_view.y)/maxIT_clouds);
|
||||
float mult = length(dV_viewTEST);
|
||||
|
||||
//////////////////////////////////////////
|
||||
////// lighting stuff
|
||||
@ -464,19 +465,17 @@ vec4 renderClouds(
|
||||
vec3 dV_Sun = WsunVec*shadowStep;
|
||||
float SdotV = dot(mat3(gbufferModelView)*WsunVec, normalize(FragPosition));
|
||||
|
||||
float mieDay = phaseg(SdotV, 0.75);
|
||||
float mieDay = phaseg(SdotV, 0.85) + phaseg(SdotV, 0.75);
|
||||
float mieDayMulti = (phaseg(SdotV, 0.35) + phaseg(-SdotV, 0.35) * 0.5) ;
|
||||
|
||||
vec3 directScattering = LightColor * mieDay * 3.14;
|
||||
vec3 directMultiScattering = LightColor * mieDayMulti * 3.14;
|
||||
|
||||
vec3 directScattering = LightColor * mieDay * 3.14 ;
|
||||
vec3 directMultiScattering = LightColor * mieDayMulti * 3.14 * 2.0;
|
||||
vec3 sunIndirectScattering = LightColor;// * phaseg(dot(mat3(gbufferModelView)*vec3(0,1,0),normalize(FragPosition)), 0.5) * 3.14;
|
||||
|
||||
|
||||
// use this to blend into the atmosphere's ground.
|
||||
vec3 approxdistance = normalize(dV_view);
|
||||
vec3 approxdistance = normalize(dV_viewTEST);
|
||||
#ifdef SKY_GROUND
|
||||
float distantfog = mix(1.0, max(1.0 - clamp(exp2(pow(abs(approxdistance.y),1.5) * -100.0),0.0,1.0),0.0), heightRelativeToClouds);
|
||||
float distantfog = mix(1.0, max(1.0 - clamp(exp2(pow(abs(approxdistance.y),mix(1.5, 4.0, rainStrength)) * -mix(100.0, 35.0, rainStrength)),0.0,1.0),0.0), heightRelativeToClouds);
|
||||
#else
|
||||
float distantfog = 1.0;
|
||||
float distantfog2 = mix(1.0, max(1.0 - clamp(exp(pow(abs(approxdistance.y),1.5) * -35.0),0.0,1.0),0.0), heightRelativeToClouds);
|
||||
@ -485,11 +484,12 @@ vec4 renderClouds(
|
||||
// terrible fake rayleigh scattering
|
||||
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5)*3.0;
|
||||
float atmosphere = exp(abs(approxdistance.y) * -5.0);
|
||||
vec3 scatter = exp(-10000.0 * rC * atmosphere) * distantfog;
|
||||
vec3 scatter = distantfog * exp(-10000.0 * rC * atmosphere);
|
||||
|
||||
directScattering *= scatter;
|
||||
directMultiScattering *= scatter;
|
||||
// sunIndirectScattering *= scatter;
|
||||
|
||||
SkyColor *= mix(1.0* Sky_Brightness, 1.0-pow(1.0-clamp(SignedWsunvec.y,0.0,1.0),5.0) * 0.75 + 0.25, distantfog);
|
||||
|
||||
//////////////////////////////////////////
|
||||
////// render Cloud layers and do blending orders
|
||||
@ -515,17 +515,19 @@ vec4 renderClouds(
|
||||
|
||||
|
||||
#ifdef CloudLayer0
|
||||
vec3 layer0_start = layerStartingPosition(dV_view, cameraPosition, Dither.y, MinHeight, MaxHeight);
|
||||
vec3 layer0_dV_view = dV_view * (LAYER0_width/abs(dV_view.y)/maxIT_clouds);
|
||||
vec3 layer0_start = layerStartingPosition(layer0_dV_view, cameraPosition, Dither.y, MinHeight, MaxHeight);
|
||||
#endif
|
||||
#ifdef CloudLayer1
|
||||
vec3 layer1_start = layerStartingPosition(dV_view, cameraPosition, Dither.y, MinHeight1, MaxHeight1);
|
||||
vec3 layer1_dV_view = dV_view * (LAYER1_width/abs(dV_view.y)/maxIT_clouds);
|
||||
vec3 layer1_start = layerStartingPosition(layer1_dV_view, cameraPosition, Dither.y, MinHeight1, MaxHeight1);
|
||||
#endif
|
||||
#ifdef CloudLayer2
|
||||
vec3 layer2_start = layerStartingPosition(dV_view_Alto, cameraPosition, Dither.y, Height2, Height2);
|
||||
#endif
|
||||
|
||||
#ifdef CloudLayer0
|
||||
vec4 layer0 = renderLayer(0, layer0_start, dV_view, mult, Dither.x, maxIT_clouds, MinHeight, MaxHeight, dV_Sun, LAYER0_DENSITY, SkyColor, directScattering, directMultiScattering* 2.0, sunIndirectScattering, distantfog, false, FragPosition);
|
||||
vec4 layer0 = renderLayer(0, layer0_start, layer0_dV_view, mult, Dither.x, maxIT_clouds, MinHeight, MaxHeight, dV_Sun, LAYER0_DENSITY, SkyColor, directScattering, directMultiScattering, sunIndirectScattering, distantfog, false, FragPosition);
|
||||
total_extinction *= layer0.a;
|
||||
|
||||
// stop overdraw.
|
||||
@ -537,7 +539,7 @@ vec4 renderClouds(
|
||||
#endif
|
||||
|
||||
#ifdef CloudLayer1
|
||||
vec4 layer1 = renderLayer(1, layer1_start, dV_view, mult, Dither.x, maxIT_clouds, MinHeight1, MaxHeight1, dV_Sun, LAYER1_DENSITY, SkyColor, directScattering, directMultiScattering* 2.0, sunIndirectScattering, distantfog, notVisible, FragPosition);
|
||||
vec4 layer1 = renderLayer(1, layer1_start, layer1_dV_view, mult, Dither.x, maxIT_clouds, MinHeight1, MaxHeight1, dV_Sun, LAYER1_DENSITY, SkyColor, directScattering, directMultiScattering, sunIndirectScattering, distantfog, notVisible, FragPosition);
|
||||
total_extinction *= layer1.a;
|
||||
|
||||
// stop overdraw.
|
||||
@ -545,7 +547,7 @@ vec4 renderClouds(
|
||||
#endif
|
||||
|
||||
#ifdef CloudLayer2
|
||||
vec4 layer2 = renderLayer(2, layer2_start, dV_view_Alto, mult_alto, Dither.x, maxIT_clouds, Height2, Height2, dV_Sun, LAYER2_DENSITY, SkyColor, directScattering, directMultiScattering,sunIndirectScattering, distantfog, altoNotVisible, FragPosition);
|
||||
vec4 layer2 = renderLayer(2, layer2_start, dV_view_Alto, mult_alto, Dither.x, maxIT_clouds, Height2, Height2, dV_Sun, LAYER2_DENSITY, SkyColor, directScattering * (1.0 + rainStrength*3), directMultiScattering* (1.0 + rainStrength*3), sunIndirectScattering, distantfog, altoNotVisible, FragPosition);
|
||||
total_extinction *= layer2.a;
|
||||
#endif
|
||||
|
||||
@ -585,7 +587,7 @@ vec4 renderClouds(
|
||||
#endif
|
||||
|
||||
#ifndef SKY_GROUND
|
||||
vec3 normView = normalize(dV_view);
|
||||
vec3 normView = normalize(dV_viewTEST);
|
||||
vec4 fogcolor = vec4(skyFromTex(normView, colortex4)/30.0, 0.0);
|
||||
|
||||
return mix(fogcolor, vec4(color, total_extinction), clamp(distantfog2,0.0,1.0));
|
||||
@ -606,15 +608,15 @@ float GetCloudShadow(vec3 feetPlayerPos){
|
||||
// assume a flat layer of cloud, and stretch the sampled density along the sunvector, starting from some vertical layer in the cloud.
|
||||
#ifdef CloudLayer0
|
||||
vec3 lowShadowStart = playerPos + (WsunVec / max(abs(WsunVec.y),0.0)) * max((CloudLayer0_height + 30) - playerPos.y,0.0) ;
|
||||
shadow += GetCumulusDensity(0, lowShadowStart, 0, CloudLayer0_height, CloudLayer0_height+100)*dailyWeatherParams1.x;
|
||||
shadow += GetCumulusDensity(0, lowShadowStart, 0, CloudLayer0_height, CloudLayer0_height+100)*LAYER0_DENSITY;
|
||||
#endif
|
||||
#ifdef CloudLayer1
|
||||
vec3 higherShadowStart = playerPos + (WsunVec / max(abs(WsunVec.y),0.0)) * max((CloudLayer1_height + 50) - playerPos.y,0.0) ;
|
||||
shadow += GetCumulusDensity(1, higherShadowStart, 0, CloudLayer1_height, CloudLayer1_height+100)*dailyWeatherParams1.y;
|
||||
shadow += GetCumulusDensity(1, higherShadowStart, 0, CloudLayer1_height, CloudLayer1_height+100)*LAYER1_DENSITY;
|
||||
#endif
|
||||
#ifdef CloudLayer2
|
||||
vec3 highShadowStart = playerPos + (WsunVec / max(abs(WsunVec.y),0.0)) * max(CloudLayer2_height - playerPos.y,0.0);
|
||||
shadow += GetAltostratusDensity(highShadowStart) * dailyWeatherParams1.z;
|
||||
shadow += GetAltostratusDensity(highShadowStart) * CloudLayer2_density * (1.0-abs(WsunVec.y));
|
||||
#endif
|
||||
|
||||
shadow = clamp(shadow,0.0,1.0);
|
||||
@ -636,15 +638,15 @@ float GetCloudShadow_VLFOG(vec3 WorldPos, vec3 WorldSpace_sunVec){
|
||||
|
||||
#ifdef CloudLayer0
|
||||
vec3 lowShadowStart = WorldPos + (WorldSpace_sunVec / max(abs(WorldSpace_sunVec.y),0.0)) * max((CloudLayer0_height + 30) - WorldPos.y,0.0) ;
|
||||
shadow += max(GetCumulusDensity(0, lowShadowStart, 0, CloudLayer0_height, CloudLayer0_height+100),0.0)*dailyWeatherParams1.x;
|
||||
shadow += max(GetCumulusDensity(0, lowShadowStart, 0, CloudLayer0_height, CloudLayer0_height+100),0.0)*LAYER0_DENSITY;
|
||||
#endif
|
||||
#ifdef CloudLayer1
|
||||
vec3 higherShadowStart = WorldPos + (WorldSpace_sunVec / max(abs(WorldSpace_sunVec.y),0.0)) * max((CloudLayer1_height + 30) - WorldPos.y,0.0) ;
|
||||
shadow += max(GetCumulusDensity(1,higherShadowStart, 0, CloudLayer1_height,CloudLayer1_height+100) ,0.0)*dailyWeatherParams1.y;
|
||||
shadow += max(GetCumulusDensity(1,higherShadowStart, 0, CloudLayer1_height,CloudLayer1_height+100) ,0.0)*LAYER1_DENSITY;
|
||||
#endif
|
||||
#ifdef CloudLayer2
|
||||
vec3 highShadowStart = WorldPos + (WorldSpace_sunVec / max(abs(WorldSpace_sunVec.y),0.0)) * max(CloudLayer2_height - WorldPos.y,0.0);
|
||||
shadow += GetAltostratusDensity(highShadowStart)*dailyWeatherParams1.z * 0.5;
|
||||
shadow += GetAltostratusDensity(highShadowStart)*LAYER2_DENSITY * (1.0-abs(WorldSpace_sunVec.y));
|
||||
#endif
|
||||
|
||||
shadow = clamp(shadow,0.0,1.0);
|
||||
|
@ -32,22 +32,20 @@ iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TRANSLUCENT_ENTITIES
|
||||
#if defined TRANSLUCENT_ENTITIES && defined IS_IRIS
|
||||
separateEntityDraws = true
|
||||
#else
|
||||
separateEntityDraws = false
|
||||
#endif
|
||||
|
||||
program.world0/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world0/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world0/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
program.world0/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
|
||||
program.world-1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world-1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
|
||||
program.world1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world-1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
program.world-1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
|
||||
program.world1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
program.world1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES && IS_IRIS
|
||||
|
||||
#if defined DISTANT_HORIZONS && defined IS_IRIS
|
||||
|
||||
@ -113,7 +111,7 @@ alphaTest.gbuffers_water = false
|
||||
alphaTest.gbuffers_skybasic = false
|
||||
alphaTest.gbuffers_skytextured = false
|
||||
|
||||
sliders = DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_NORMAL_STRENGTH
|
||||
sliders = MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL LPV_SATURATION LPV_NORMAL_STRENGTH
|
||||
|
||||
screen.columns=2
|
||||
screen = \
|
||||
@ -122,9 +120,19 @@ BLISS_SHADERS <empty> \
|
||||
[Direct_Light] [World] \
|
||||
[Ambient_light] [Fog] \
|
||||
[Post_Processing] [Clouds] \
|
||||
[LabPBR] [Climate] \
|
||||
[Resource_Pack_Support] [Climate] \
|
||||
<empty> <empty> \
|
||||
[Misc_Settings] [DISTANT_HORIZONS_SETTINGS] \
|
||||
[Misc_Settings] [Mod_support] \
|
||||
|
||||
# screen = \
|
||||
# BLISS_SHADERS <empty> \
|
||||
# <empty> <empty> \
|
||||
# [Direct_Light] [World] \
|
||||
# [Ambient_light] [Fog] \
|
||||
# [Post_Processing] [Clouds] \
|
||||
# [LabPBR] [Climate] \
|
||||
# <empty> <empty> \
|
||||
# [Misc_Settings] [DISTANT_HORIZONS_SETTINGS] \
|
||||
|
||||
######## LIGHTING
|
||||
### DIRECT LIGHT
|
||||
@ -134,9 +142,6 @@ BLISS_SHADERS <empty> \
|
||||
screen.Shadows.columns=1
|
||||
screen.Shadows = TRANSLUCENT_COLORED_SHADOWS SCREENSPACE_CONTACT_SHADOWS RENDER_ENTITY_SHADOWS RENDER_PLAYER_SHADOWS entityShadowDistanceMul <empty> [Filtering] shadowMapResolution shadowDistance OPTIMIZED_SHADOW_DISTANCE
|
||||
|
||||
screen.Subsurface_Scattering.columns=1
|
||||
screen.Subsurface_Scattering = SSS_TYPE sss_density_multiplier sss_absorbance_multiplier LabSSS_Curve <empty> MISC_BLOCK_SSS MOB_SSS <empty> Ambient_SSS ambientsss_brightness
|
||||
|
||||
screen.Filtering.columns=1
|
||||
screen.Filtering = BASIC_SHADOW_FILTER SHADOW_FILTER_SAMPLE_COUNT Min_Shadow_Filter_Radius <empty> Variable_Penumbra_Shadows VPS_Search_Samples Max_Shadow_Filter_Radius Max_Filter_Depth
|
||||
|
||||
@ -159,37 +164,39 @@ BLISS_SHADERS <empty> \
|
||||
screen.Ambient_Colors.columns=1
|
||||
screen.Ambient_Colors = ambient_brightness MIN_LIGHT_AMOUNT <empty> AmbientLight_R AmbientLight_G AmbientLight_B
|
||||
|
||||
### LABPBR
|
||||
screen.LabPBR.columns = 1
|
||||
screen.LabPBR = [Reflections] [Subsurface_Scattering] [Emissives] [POM] [Porosity] MATERIAL_AO
|
||||
### RESOURCE PACK SUPPORT
|
||||
screen.Resource_Pack_Support.columns = 1
|
||||
screen.Resource_Pack_Support = [Reflections] [Emissives] [Subsurface_Scattering] [POM] [Porosity] MATERIAL_AO RESOURCEPACK_SKY
|
||||
|
||||
screen.Reflections.columns=2
|
||||
screen.Reflections = Specular_Reflections Sun_specular_Strength Screen_Space_Reflections reflection_quality Rough_reflections Roughness_Threshold Sky_reflection Dynamic_SSR_quality
|
||||
|
||||
screen.Subsurface_Scattering.columns=1
|
||||
screen.Subsurface_Scattering = SSS_TYPE sss_density_multiplier sss_absorbance_multiplier LabSSS_Curve <empty> MISC_BLOCK_SSS MOB_SSS <empty> Ambient_SSS ambientsss_brightness
|
||||
|
||||
screen.Emissives.columns = 1
|
||||
screen.Emissives = EMISSIVE_TYPE Emissive_Brightness Emissive_Curve
|
||||
|
||||
screen.POM.columns=1
|
||||
screen.POM = POM Adaptive_Step_length MAX_ITERATIONS POM_DEPTH MAX_DIST Horrible_slope_normals
|
||||
|
||||
screen.Porosity.columns = 1
|
||||
screen.Porosity = Porosity <empty> Puddles Puddle_Size
|
||||
|
||||
### FloodFill
|
||||
screen.LPV.columns = 1
|
||||
screen.LPV = LPV_ENABLED LPV_SIZE LPV_SATURATION LPV_NORMAL_STRENGTH LPV_ENTITY_LIGHTS LPV_REDSTONE_LIGHTS LPV_COLORED_CANDLES
|
||||
|
||||
######## WORLD
|
||||
screen.World.columns=1
|
||||
screen.World = [Water] [Waving_Stuff] [LabPBR] SKY_GROUND RESOURCEPACK_SKY <empty> AEROCHROME_MODE AEROCHROME_PINKNESS AEROCHROME_WOOL_ENABLED
|
||||
### SPECULARS
|
||||
screen.Reflections.columns=2
|
||||
screen.Reflections = Specular_Reflections Sun_specular_Strength Screen_Space_Reflections reflection_quality Rough_reflections Roughness_Threshold Sky_reflection Dynamic_SSR_quality
|
||||
### WAVING STUFF
|
||||
screen.World = [Water] [Waving_Stuff] [Sky_coefficients] SKY_GROUND <empty> AEROCHROME_MODE AEROCHROME_PINKNESS AEROCHROME_WOOL_ENABLED
|
||||
### WAVING STUFF
|
||||
screen.Waving_Stuff.columns=1
|
||||
screen.Waving_Stuff = WAVY_PLANTS WAVY_STRENGTH WAVY_SPEED
|
||||
## POM
|
||||
screen.POM.columns=1
|
||||
screen.POM = HEIGTHMAP_DEPTH_OFFSET POM Adaptive_Step_length MAX_ITERATIONS POM_DEPTH MAX_DIST Horrible_slope_normals
|
||||
screen.Waving_Stuff = WAVY_PLANTS WAVY_STRENGTH WAVY_SPEED
|
||||
|
||||
|
||||
|
||||
######## CLIMATE
|
||||
screen.Climate.columns=1
|
||||
screen.Climate = [Seasons] <empty> PER_BIOME_ENVIRONMENT [SWAMP] [JUNGLE] [DARKFOREST]
|
||||
screen.Climate = [Seasons] <empty> PER_BIOME_ENVIRONMENT [SWAMP] [JUNGLE] [DARKFOREST] SNOW_STORMS SAND_STORMS
|
||||
|
||||
## BIOME SPECIFICS
|
||||
screen.SWAMP.columns=1
|
||||
@ -201,7 +208,6 @@ BLISS_SHADERS <empty> \
|
||||
screen.DARKFOREST.columns=1
|
||||
screen.DARKFOREST = DARKFOREST_ENV DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY <empty> DARKFOREST_R DARKFOREST_G DARKFOREST_B
|
||||
|
||||
|
||||
## SEASONS
|
||||
screen.Seasons.columns=1
|
||||
screen.Seasons = Seasons Season_Length Start_Season Snowy_Winter <empty> [Summer_colors] [Fall_colors] [Winter_colors] [Spring_colors]
|
||||
@ -265,20 +271,20 @@ BLISS_SHADERS <empty> \
|
||||
SCREENSPACE_REFLECTIONS SSR_STEPS \
|
||||
WATER_BACKGROUND_SPECULAR Dirt_Amount \
|
||||
[Water_fog_color] Water_Top_Layer \
|
||||
SNELLS_WINDOW WATER_WAVE_STRENGTH WATER_WAVE_SPEED
|
||||
SNELLS_WINDOW WATER_WAVE_STRENGTH WATER_WAVE_SPEED LARGE_WAVE_DISPLACEMENT
|
||||
|
||||
screen.Water_fog_color.columns=1
|
||||
screen.Water_fog_color = Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B
|
||||
|
||||
######## POST
|
||||
screen.Post_Processing.columns=2
|
||||
screen.Post_Processing = [TAA_OPTIONS] [Tonemapping] [Exposure] [DepthOfField] [Purkinje_effect] [COLOR_GRADING] [GAMEPLAY_EFFECTS] <empty> SHARPENING BLOOM_STRENGTH CAMERA_GRIDLINES
|
||||
screen.Post_Processing = [TAA_OPTIONS] [Tonemapping] [Exposure] [DepthOfField] [Purkinje_effect] [COLOR_GRADING] [GAMEPLAY_EFFECTS] <empty> SHARPENING BLOOM_STRENGTH CAMERA_GRIDLINES MOTION_BLUR MOTION_BLUR_STRENGTH
|
||||
### TAA
|
||||
screen.TAA_OPTIONS.columns = 1
|
||||
screen.TAA_OPTIONS= SCREENSHOT_MODE <empty> TAA BLEND_FACTOR <empty> TAA_UPSCALING SCALE_FACTOR
|
||||
### DOF
|
||||
screen.DepthOfField.columns = 1
|
||||
screen.DepthOfField = DOF_QUALITY DOF_ANAMORPHIC_RATIO AUTOFOCUS focal aperture MANUAL_FOCUS DoF_Adaptation_Speed FAR_BLUR_ONLY [JITTER_DOF]
|
||||
screen.DepthOfField = DOF_QUALITY DOF_ANAMORPHIC_RATIO focal aperture MANUAL_FOCUS DoF_Adaptation_Speed FAR_BLUR_ONLY [JITTER_DOF]
|
||||
screen.JITTER_DOF.columns=1
|
||||
screen.JITTER_DOF = JITTER_STRENGTH FOCUS_LASER_COLOR SCREENSHOT_MODE
|
||||
### EXPOSURE
|
||||
@ -302,19 +308,27 @@ BLISS_SHADERS <empty> \
|
||||
SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL
|
||||
|
||||
### COOL GAMEPLAY EFFECTS
|
||||
screen.GAMEPLAY_EFFECTS = MOTION_AMOUNT DAMAGE_TAKEN_EFFECT LOW_HEALTH_EFFECT WATER_ON_CAMERA_EFFECT
|
||||
screen.GAMEPLAY_EFFECTS = MOTION_AMOUNT DAMAGE_TAKEN_EFFECT LOW_HEALTH_EFFECT WATER_ON_CAMERA_EFFECT
|
||||
|
||||
|
||||
|
||||
|
||||
######## MOD SUPPORT SETTINGS
|
||||
screen.Mod_support = [DISTANT_HORIZONS_SETTINGS]
|
||||
|
||||
screen.DISTANT_HORIZONS_SETTINGS.columns = 1
|
||||
screen.DISTANT_HORIZONS_SETTINGS = DH_OVERDRAW_PREVENTION OVERDRAW_MAX_DISTANCE <empty> DH_AMBIENT_OCCLUSION DH_SUBSURFACE_SCATTERING DH_SCREENSPACE_REFLECTIONS <empty> DISTANT_HORIZONS_SHADOWMAP shadowDistance shadowMapResolution <empty> TOGGLE_VL_FOG VOLUMETRIC_CLOUDS
|
||||
|
||||
|
||||
######## MISC SETTINGS
|
||||
screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INTERSECT_TERRAIN SELECT_BOX WATER_CAUSTICS_BRIGHTNESS HYPER_DETAILED_WAVES OLD_BLOOM DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX
|
||||
screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INTERSECT_TERRAIN SELECT_BOX WATER_CAUSTICS_BRIGHTNESS HYPER_DETAILED_WAVES OLD_BLOOM DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES
|
||||
|
||||
screen.the_orb.columns = 1
|
||||
screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
|
||||
screen.the_orb.columns = 1
|
||||
screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
|
||||
|
||||
screen.DISTANT_HORIZONS_SETTINGS.columns = 1
|
||||
screen.DISTANT_HORIZONS_SETTINGS = DH_KNOWN_ISSUES <EMPTY> DISTANT_HORIZONS_SHADOWMAP shadowDistance shadowMapResolution <empty> DH_OVERDRAW_PREVENTION TOGGLE_VL_FOG VOLUMETRIC_CLOUDS
|
||||
|
||||
#####################################
|
||||
####### WEATHER RELATED STUFF #######
|
||||
#####################################
|
||||
|
||||
screen.DAILY_WEATHER.columns = 2
|
||||
screen.DAILY_WEATHER = Daily_Weather CHOOSE_RANDOM_WEATHER_PROFILE \
|
||||
@ -345,9 +359,6 @@ BLISS_SHADERS <empty> \
|
||||
screen.DAY9_WEATHER.columns = 2
|
||||
screen.DAY9_WEATHER = DAY9_l0_coverage DAY9_l0_density DAY9_l1_coverage DAY9_l1_density DAY9_l2_coverage DAY9_l2_density DAY9_ufog_density DAY9_cfog_density
|
||||
|
||||
#####################################
|
||||
####### WEATHER RELATED STUFF #######
|
||||
#####################################
|
||||
|
||||
# thank you sixthsurge!
|
||||
#ifdef LIGHTNING_FLASH
|
||||
@ -393,16 +404,24 @@ variable.int.BiomeTransitionTime = 60
|
||||
uniform.float.isMangroveSwamp = 0.0
|
||||
#endif
|
||||
|
||||
# set to only happen in dry deserts.
|
||||
uniform.float.sandStorm = smooth(if(in(biome, 5, 26, 27, 28), rainStrength, 0), 15,30)
|
||||
#ifdef SNOW_STORMS
|
||||
uniform.float.snowStorm = smooth(if(in(biome, 31, 32, 33, 34), rainStrength, 0), 15,30)
|
||||
#else
|
||||
uniform.float.snowStorm = 0.0;
|
||||
#endif
|
||||
|
||||
# set to only happen in cold mountains.
|
||||
uniform.float.snowStorm = smooth(if(in(biome, 31, 32, 33, 34), rainStrength, 0), 15,30)
|
||||
#ifdef SAND_STORMS
|
||||
#if defined IS_IRIS
|
||||
uniform.float.sandStorm = smooth(if(in(biome, 5, 26, 27, 28), thunderStrength, 0), 15,30)
|
||||
#else
|
||||
uniform.float.sandStorm = smooth(if(in(biome, 5, 26, 27, 28), rainStrength, 0), 15,30)
|
||||
#endif
|
||||
#else
|
||||
uniform.float.sandStorm = 0.0;
|
||||
#endif
|
||||
|
||||
uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31, 32, 33, 34, 5, 17, 18, 26, 27, 28), 0,1), 15,15)
|
||||
|
||||
|
||||
|
||||
############################
|
||||
####### RANDOM STUFF #######
|
||||
############################
|
||||
@ -410,7 +429,6 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
|
||||
#if defined WATER_ON_CAMERA_EFFECT
|
||||
uniform.float.exitWater = smooth(if(isEyeInWater == 1,1,0),0.0,5.0)
|
||||
#endif
|
||||
# uniform.float.exitPowderSnow = smooth(if(isEyeInWater == 3,1,0),0.0,5.0)
|
||||
|
||||
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT
|
||||
#ifdef IS_IRIS
|
||||
@ -421,14 +439,14 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
|
||||
variable.float.interpolatedHealth = smooth(if(is_hurt, 0.0, Currenthealth), 0.0, 1.0)
|
||||
|
||||
# detect over 5 hearts of damage taken
|
||||
variable.bool.largeHealthDifference = (interpolatedHealth - Currenthealth) >= 10.0
|
||||
variable.bool.largeHealthDifference = (interpolatedHealth - Currenthealth) >= 7.0
|
||||
variable.bool.delayedCritDamage = smooth(if(largeHealthDifference, 1.0, 0.0), 0.0, 1.0) > 0.01
|
||||
|
||||
uniform.float.CriticalDamageTaken = smooth(if(delayedCritDamage && currentPlayerHealth > -1.0, 1.0, 0.0), 0.5, 3.0)
|
||||
|
||||
# detect over 2 hearts of damage taken
|
||||
variable.bool.smallHealthDifference = (interpolatedHealth - Currenthealth) >= 4.0
|
||||
uniform.float.MinorDamageTaken = smooth(if(smallHealthDifference && currentPlayerHealth > -1.0, 1.0, 0.0), 0.5, 1.0)
|
||||
variable.bool.smallHealthDifference = (interpolatedHealth - Currenthealth) >= 3.0
|
||||
uniform.float.MinorDamageTaken = smooth(if(smallHealthDifference && currentPlayerHealth > -1.0, 5.0, 0.0), 0.5, 1.0)
|
||||
|
||||
#else
|
||||
uniform.bool.isDead = !is_alive
|
||||
@ -436,6 +454,22 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
|
||||
#endif
|
||||
|
||||
|
||||
# the idea is to modulate the mood value between 0 - 1
|
||||
# then check if the modulated value is non-zero. when it goes back to zero, it will have a very slowly deteriorating value.
|
||||
# that value immediately regenerates when it modulates to 1 again. this way, i can check if the mood is climbing by checking if the smoothed value is above zero.
|
||||
|
||||
# doing this is just for readablity, not required.
|
||||
variable.float.playerMoodPercent = playerMood*100.0 + 1.0
|
||||
# modulo 0 - 1
|
||||
variable.float.modMood = playerMoodPercent - floor(playerMoodPercent)
|
||||
|
||||
# check if mood is increasing.
|
||||
# and only activate when mood is above the threshold (5% mood)
|
||||
# make sure it degenerates slow enough that mood can reach 5% after the mood flips to 0% from 100%
|
||||
variable.bool.moodIsClimbing = smooth(if(modMood > 0.50 && playerMoodPercent > 5.0, 1.0, 0.0), 0.0, 100.0) > 0.1
|
||||
|
||||
# add one more check to turn it off when lightlevels are not zero
|
||||
uniform.float.caveDetection = smooth(if(moodIsClimbing && eyeBrightness.y < 0.01, 1.0, 0.0), 1.0, 1.0)
|
||||
|
||||
|
||||
|
||||
|
5
shaders/world-1/composite13.fsh
Normal file
5
shaders/world-1/composite13.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.fsh"
|
5
shaders/world-1/composite13.vsh
Normal file
5
shaders/world-1/composite13.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.vsh"
|
5
shaders/world0/composite13.fsh
Normal file
5
shaders/world0/composite13.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.fsh"
|
5
shaders/world0/composite13.vsh
Normal file
5
shaders/world0/composite13.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.vsh"
|
@ -1,5 +1,3 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/final.fsh"
|
@ -1,5 +1,3 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/final.vsh"
|
@ -126,7 +126,13 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
|
||||
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),1.0);
|
||||
}
|
||||
|
||||
vec3 viewToWorld(vec3 viewPos) {
|
||||
vec4 pos;
|
||||
pos.xyz = viewPos;
|
||||
pos.w = 0.0;
|
||||
pos = shadowModelViewInverse * pos;
|
||||
return pos.xyz;
|
||||
}
|
||||
|
||||
// uniform int renderStage;
|
||||
|
||||
@ -236,24 +242,54 @@ void main() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WAVY_PLANTS
|
||||
bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
|
||||
if (
|
||||
(
|
||||
blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GROUND_WAVING_VERTICAL ||
|
||||
blockId == BLOCK_GRASS_SHORT || (blockId == BLOCK_GRASS_TALL_UPPER && istopv) ||
|
||||
blockId == BLOCK_SAPLING
|
||||
) && length(position.xy) < 24.0
|
||||
) {
|
||||
playerpos += calcMovePlants(playerpos + cameraPosition)*gl_MultiTexCoord1.y;
|
||||
position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
|
||||
}
|
||||
// #ifdef WAVY_PLANTS
|
||||
// bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
|
||||
// if (
|
||||
// (
|
||||
// blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GROUND_WAVING_VERTICAL ||
|
||||
// blockId == BLOCK_GRASS_SHORT || (blockId == BLOCK_GRASS_TALL_UPPER && istopv) ||
|
||||
// blockId == BLOCK_SAPLING
|
||||
// ) && length(position.xy) < 24.0
|
||||
// ) {
|
||||
// playerpos += calcMovePlants(playerpos + cameraPosition)*gl_MultiTexCoord1.y;
|
||||
// position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
|
||||
// }
|
||||
|
||||
if (blockId == BLOCK_AIR_WAVING && length(position.xy) < 24.0) {
|
||||
playerpos += calcMoveLeaves(playerpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
|
||||
position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
|
||||
}
|
||||
// if (blockId == BLOCK_AIR_WAVING && length(position.xy) < 24.0) {
|
||||
// playerpos += calcMoveLeaves(playerpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
|
||||
// position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
#ifdef WAVY_PLANTS
|
||||
// also use normal, so up/down facing geometry does not get detatched from its model parts.
|
||||
bool InterpolateFromBase = gl_MultiTexCoord0.t < max(mc_midTexCoord.t, abs(viewToWorld(normalize(gl_NormalMatrix * gl_Normal)).y));
|
||||
|
||||
if(
|
||||
(
|
||||
// these wave off of the ground. the area connected to the ground does not wave.
|
||||
(InterpolateFromBase && (blockId == BLOCK_GRASS_TALL_LOWER || blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GRASS_SHORT || blockId == BLOCK_SAPLING || blockId == BLOCK_GROUND_WAVING_VERTICAL))
|
||||
|
||||
// these wave off of the ceiling. the area connected to the ceiling does not wave.
|
||||
|| (!InterpolateFromBase && (blockId == 17))
|
||||
|
||||
// these wave off of the air. they wave uniformly
|
||||
|| (blockId == BLOCK_GRASS_TALL_UPPER || blockId == BLOCK_AIR_WAVING)
|
||||
|
||||
) && length(position.xy) < 24.0
|
||||
){
|
||||
vec3 worldpos = playerpos;
|
||||
|
||||
// apply displacement for waving plant blocks
|
||||
worldpos += calcMovePlants(playerpos + cameraPosition) * max(gl_MultiTexCoord1.y,0.5);
|
||||
|
||||
// apply displacement for waving leaf blocks specifically, overwriting the other waving mode. these wave off of the air. they wave uniformly
|
||||
if(blockId == BLOCK_AIR_WAVING) worldpos = playerpos + calcMoveLeaves(playerpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
|
||||
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
if(entityId == 1100) position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
|
||||
|
5
shaders/world1/composite13.fsh
Normal file
5
shaders/world1/composite13.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.fsh"
|
5
shaders/world1/composite13.vsh
Normal file
5
shaders/world1/composite13.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite12.vsh"
|
Loading…
Reference in New Issue
Block a user