Compare commits
12 Commits
samstuff
...
2.8.0.1-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
0a83a25bf6
|
|||
|
f8ce62e13c
|
|||
|
4575c6c019
|
|||
|
e7d76c5330
|
|||
|
983c34733a
|
|||
|
|
394cebeb35
|
||
|
|
900a5786d4
|
||
|
|
594fed6925
|
||
|
|
2e9a57108c
|
||
|
|
af23ca7155
|
||
|
|
c89fe222fc
|
||
|
|
ee85cdd98b
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule ".minecraft/TCNodeTracker"]
|
||||
path = .minecraft/TCNodeTracker
|
||||
url = https://gitea.emblad.com/samsonsin/Gregtech-New-Bastards-TCNodeTracker
|
||||
6
.minecraft/config/shaders.properties
Normal file
6
.minecraft/config/shaders.properties
Normal file
@@ -0,0 +1,6 @@
|
||||
#This file stores configuration options for AngelicaShaders, such as the currently active shaderpack
|
||||
#Fri May 30 00:08:06 CEST 2025
|
||||
disableUpdateMessage=false
|
||||
maxShadowRenderDistance=32
|
||||
shaderPack=ComplementaryShaders_v4.6
|
||||
enableShaders=true
|
||||
88
.minecraft/config/shouldersurfing.cfg
Normal file
88
.minecraft/config/shouldersurfing.cfg
Normal file
@@ -0,0 +1,88 @@
|
||||
# Configuration file
|
||||
|
||||
general {
|
||||
S:"Adaptive Crosshair Items" <
|
||||
minecraft:snowball
|
||||
minecraft:egg
|
||||
minecraft:experience_bottle
|
||||
minecraft:ender_pearl
|
||||
minecraft:fishing_rod
|
||||
>
|
||||
|
||||
# Size of the camera adjustment per step
|
||||
D:"Camera step size"=0.025
|
||||
|
||||
# Crosshair type to use for shoulder surfing
|
||||
S:"Crosshair type"=ADAPTIVE
|
||||
|
||||
# The raytrace distance used for the dynamic crosshair
|
||||
D:"Custom Raytrace Distance"=400.0
|
||||
|
||||
# The default perspective when you load the game
|
||||
S:"Default Perspective"=FIRST_PERSON
|
||||
|
||||
# Crosshair visibility for FIRST_PERSON
|
||||
S:"FIRST_PERSON Crosshair Visibility"=ALWAYS
|
||||
|
||||
# Whether or not to hide the player model if the camera gets too close to it
|
||||
B:"Keep Camera Out Of Head"=true
|
||||
|
||||
# Whether or not to limit the player reach depending on the crosshair location (perspective offset)
|
||||
B:"Limit player reach"=true
|
||||
|
||||
# If x-offset is limited this is the maximum amount
|
||||
D:"Maximum x-offset"=3.0
|
||||
|
||||
# If y-offset is limited this is the maximum amount
|
||||
D:"Maximum y-offset"=1.5
|
||||
|
||||
# If z-offset is limited this is the maximum amount
|
||||
D:"Maximum z-offset"=5.0
|
||||
|
||||
# If x-offset is limited this is the minimum amount
|
||||
D:"Minimum x-offset"=-3.0
|
||||
|
||||
# If y-offset is limited this is the minimum amount
|
||||
D:"Minimum y-offset"=-1.0
|
||||
|
||||
# If z-offset is limited this is the minimum amount
|
||||
D:"Minimum z-offset"=-3.0
|
||||
|
||||
# Whether or not to remember the last perspective used
|
||||
B:"Remember Last Perspective"=true
|
||||
|
||||
# Whether or not to replace the default third person perspective
|
||||
B:"Replace Default Perspective"=true
|
||||
|
||||
# Crosshair visibility for SHOULDER_SURFING
|
||||
S:"SHOULDER_SURFING Crosshair Visibility"=ALWAYS
|
||||
|
||||
# Crosshair visibility for THIRD_PERSON_BACK
|
||||
S:"THIRD_PERSON_BACK Crosshair Visibility"=ALWAYS
|
||||
|
||||
# Crosshair visibility for THIRD_PERSON_FRONT
|
||||
S:"THIRD_PERSON_FRONT Crosshair Visibility"=ALWAYS
|
||||
|
||||
# Whether or not x-offset adjustment has limits
|
||||
B:"Unlimited x-offset"=false
|
||||
|
||||
# Whether or not y-offset adjustment has limits
|
||||
B:"Unlimited y-offset"=false
|
||||
|
||||
# Whether or not z-offset adjustment has limits
|
||||
B:"Unlimited z-Offset"=false
|
||||
|
||||
# Whether or not to use the custom raytrace distance used for the dynamic crosshair
|
||||
B:"Use Custom Raytrace Distance"=true
|
||||
|
||||
# Third person camera x-offset
|
||||
D:x-offset=-0.75
|
||||
|
||||
# Third person camera y-offset
|
||||
D:y-offset=0.0
|
||||
|
||||
# Third person camera z-offset
|
||||
D:z-offset=3.0
|
||||
}
|
||||
|
||||
|
||||
BIN
.minecraft/mods/BetterFoliage-MC1.7.10-2.0.17.jar
Normal file
BIN
.minecraft/mods/BetterFoliage-MC1.7.10-2.0.17.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/DynamicSurroundings-1.7.10-1.0.7.6.jar
Normal file
BIN
.minecraft/mods/DynamicSurroundings-1.7.10-1.0.7.6.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/ItemPhysic Lite 1.1.5 mc1.7.10.jar
Normal file
BIN
.minecraft/mods/ItemPhysic Lite 1.1.5 mc1.7.10.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/NoFog-1.7.10b1-1.0.jar
Normal file
BIN
.minecraft/mods/NoFog-1.7.10b1-1.0.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/ShoulderSurfing-1.7.10-2.4.1.jar
Normal file
BIN
.minecraft/mods/ShoulderSurfing-1.7.10-2.4.1.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/WorldEditCuiFe-v1.0.7-mf-1.7.10-10.13.4.1566.jar
Normal file
BIN
.minecraft/mods/WorldEditCuiFe-v1.0.7-mf-1.7.10-10.13.4.1566.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/deconfigintegration-1.0.1.jar
Normal file
BIN
.minecraft/mods/deconfigintegration-1.0.1.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/esm-legacy-1.7.10-1.0.10.jar
Normal file
BIN
.minecraft/mods/esm-legacy-1.7.10-1.0.10.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
.minecraft/mods/matmos-1.7.10-36.0.1+nomixin.jar
Normal file
BIN
.minecraft/mods/matmos-1.7.10-36.0.1+nomixin.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/sharedprospecting-2.0.3.jar
Normal file
BIN
.minecraft/mods/sharedprospecting-2.0.3.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/soundphysics-1.1.1.jar
Normal file
BIN
.minecraft/mods/soundphysics-1.1.1.jar
Normal file
Binary file not shown.
BIN
.minecraft/mods/worldedit-v0.0.8.jar
Normal file
BIN
.minecraft/mods/worldedit-v0.0.8.jar
Normal file
Binary file not shown.
220
.minecraft/options.txt
Normal file
220
.minecraft/options.txt
Normal file
@@ -0,0 +1,220 @@
|
||||
invertYMouse:false
|
||||
mouseSensitivity:0.5
|
||||
fov:0.0
|
||||
gamma:0.0
|
||||
saturation:0.0
|
||||
renderDistance:12
|
||||
guiScale:3
|
||||
particles:0
|
||||
bobView:true
|
||||
anaglyph3d:false
|
||||
advancedOpengl:false
|
||||
maxFps:120
|
||||
fboEnable:true
|
||||
difficulty:2
|
||||
fancyGraphics:true
|
||||
ao:0
|
||||
clouds:true
|
||||
resourcePacks:["GTNH-Faithful-x32.v0.9.18.1.zip","GTNH_Textures_32x32_Usernm.1_16.2023-10-01.zip","Hidden Galacticraft Thermal Padding GT V1.0.0.zip","Realistic Sky GT New Horizons.zip","rhapsodia-0.6.1.zip","mat_zen-35-1.2.2.zip"]
|
||||
lastServer:
|
||||
lang:en_US
|
||||
chatVisibility:0
|
||||
chatColors:true
|
||||
chatLinks:true
|
||||
chatLinksPrompt:true
|
||||
chatOpacity:1.0
|
||||
snooperEnabled:true
|
||||
fullscreen:false
|
||||
enableVsync:true
|
||||
hideServerAddress:false
|
||||
advancedItemTooltips:false
|
||||
pauseOnLostFocus:true
|
||||
showCape:true
|
||||
touchscreen:false
|
||||
overrideWidth:0
|
||||
overrideHeight:0
|
||||
heldItemTooltips:true
|
||||
chatHeightFocused:1.0
|
||||
chatHeightUnfocused:0.44366196
|
||||
chatScale:1.0
|
||||
chatWidth:1.0
|
||||
showInventoryAchievementHint:false
|
||||
mipmapLevels:4
|
||||
anisotropicFiltering:1
|
||||
streamBytesPerPixel:0.5
|
||||
streamMicVolume:1.0
|
||||
streamSystemVolume:1.0
|
||||
streamKbps:0.5412844
|
||||
streamFps:0.31690142
|
||||
streamCompression:1
|
||||
streamSendMetadata:true
|
||||
streamPreferredServer:
|
||||
streamChatEnabled:0
|
||||
streamChatUserFilter:0
|
||||
streamMicToggleBehavior:0
|
||||
forceUnicodeFont:false
|
||||
key_key.attack:-100
|
||||
key_key.use:-99
|
||||
key_key.forward:17
|
||||
key_key.left:30
|
||||
key_key.back:31
|
||||
key_key.right:32
|
||||
key_key.jump:57
|
||||
key_key.sneak:42
|
||||
key_key.drop:16
|
||||
key_key.inventory:18
|
||||
key_key.chat:20
|
||||
key_key.playerlist:15
|
||||
key_key.pickItem:-98
|
||||
key_key.command:53
|
||||
key_key.screenshot:60
|
||||
key_key.togglePerspective:63
|
||||
key_key.smoothCamera:0
|
||||
key_key.sprint:29
|
||||
key_key.streamStartStop:64
|
||||
key_key.streamPauseUnpause:65
|
||||
key_key.streamCommercial:0
|
||||
key_key.streamToggleMic:0
|
||||
key_key.fullscreen:87
|
||||
key_key.hotbar.1:2
|
||||
key_key.hotbar.2:3
|
||||
key_key.hotbar.3:4
|
||||
key_key.hotbar.4:5
|
||||
key_key.hotbar.5:6
|
||||
key_key.hotbar.6:7
|
||||
key_key.hotbar.7:8
|
||||
key_key.hotbar.8:9
|
||||
key_key.hotbar.9:10
|
||||
key_ALT Key:0
|
||||
key_Boost Key:0
|
||||
key_Mode Switch Key:0
|
||||
key_Side Inventory Key:0
|
||||
key_Hub Expand Key:0
|
||||
key_ae2wct.OpenTerminal:0
|
||||
key_ae2wct.OpenMagnetFilter:0
|
||||
key_ae2wct.SwitchMagnetMode:0
|
||||
key_key.toggle_focus.desc:0
|
||||
key_Draw Weapons:34
|
||||
key_Special:0
|
||||
key_key.openCompendium:25
|
||||
key_key.personalBackpack:0
|
||||
key_key.betterquesting.quests:41
|
||||
key_Open sound muffler screen:0
|
||||
key_openblocks.keybind.vario_switch:0
|
||||
key_openblocks.keybind.vario_vol_up:0
|
||||
key_openblocks.keybind.vario_vol_down:0
|
||||
key_Gravi Fly Key:0
|
||||
key_Gravi Display Hud:0
|
||||
key_GraviSuite MedKit:0
|
||||
key_HoloGlasses:76
|
||||
key_ingameinfoxml.key.toggle:0
|
||||
key_navigator.key.action:211
|
||||
key_schematica.key.load:0
|
||||
key_schematica.key.save:0
|
||||
key_schematica.key.control:0
|
||||
key_schematica.key.layerInc:0
|
||||
key_schematica.key.layerDec:0
|
||||
key_key.serverutilities.nbt:0
|
||||
key_key.serverutilities.trash:0
|
||||
key_keys.adventureBackpack.openInventory:0
|
||||
key_keys.adventureBackpack.toggleActions:0
|
||||
key_Baubles Inventory:48
|
||||
key_Change Wand Focus:0
|
||||
key_Activate Hover Harness:0
|
||||
key_Misc Wand Toggle:0
|
||||
key_waila.keybind.wailaconfig:82
|
||||
key_waila.keybind.wailadisplay:79
|
||||
key_waila.keybind.liquid:80
|
||||
key_waila.keybind.recipe:81
|
||||
key_waila.keybind.usage:75
|
||||
key_key.OpenTerminal:0
|
||||
key_Reload Shaders:0
|
||||
key_Toggle Shaders:0
|
||||
key_Shaderpack Selection Screen:0
|
||||
key_Print GLSM Debug:0
|
||||
key_Zoom:0
|
||||
key_key.tarmor:0
|
||||
key_key.tgoggles:0
|
||||
key_key.tbelt:0
|
||||
key_key.tzoom:0
|
||||
key_Open Galaxy Map:0
|
||||
key_Open Spaceship Inventory:0
|
||||
key_Toggle Sensor Goggles Mode:0
|
||||
key_Glider Toggle:0
|
||||
key_Sound Locator:0
|
||||
key_Night Vision:0
|
||||
key_Goggles of Revealing:0
|
||||
key_Step Assist:0
|
||||
key_Speed:0
|
||||
key_Jump:0
|
||||
key_Yeta Wrench Mode:0
|
||||
key_Toggle Electromagnet:0
|
||||
key_Travel Staff Blink:0
|
||||
key_Automagy.key.focusCrafting:0
|
||||
key_botaniamisc.toggleLoki:0
|
||||
key_botaniamisc.ringOfLokiClear:0
|
||||
key_botaniamisc.ringOfLokiMirror:0
|
||||
key_bbw.key.mode:0
|
||||
key_bbw.key.fluidmode:0
|
||||
key_ttmisc.toggleArmor:0
|
||||
key_key.materialCosts:0
|
||||
key_key.clipboardPaste:0
|
||||
key_key.placeItem:47
|
||||
key_key.toolConfig:0
|
||||
key_key.toolProfileChange:0
|
||||
key_key.toggleFlight:0
|
||||
key_key.toggleMagnet:0
|
||||
key_Unequip:0
|
||||
key_invtweaks.key.sort:19
|
||||
key_key.littletiles.rotateup:0
|
||||
key_key.littletiles.rotatedown:0
|
||||
key_key.littletiles.rotateright:0
|
||||
key_key.littletiles.rotateleft:0
|
||||
key_key.littletiles.flip:0
|
||||
key_key.littletiles.mark:0
|
||||
key_MAtmos:62
|
||||
key_key.nutrition:49
|
||||
key_key.openglasses.interact:0
|
||||
key_key.openglasses.interactToggle:0
|
||||
key_sharewhereiam.keybinding.share.name:210
|
||||
key_key.aspectMenu:23
|
||||
key_tcnodetracker.key.togglenode:0
|
||||
key_keybinding.jumptoggle:0
|
||||
key_keybinding.speedtoggle:0
|
||||
key_keybinding.omnitoggle:0
|
||||
key_keybinding.inertiatoggle:0
|
||||
key_Change Arcane Lens:0
|
||||
key_Activate Morphic Fingers:0
|
||||
key_Toggle Spider Climb:0
|
||||
key_Toggle Chameleon Skin:0
|
||||
key_TG.keybind.openInv:0
|
||||
key_TG.keybind.activeaAbilities:0
|
||||
key_TG.keybind.activeAbility1:0
|
||||
key_TG.keybind.activeAbility2:0
|
||||
key_TG.keybind.activeAbility3:0
|
||||
key_visualprospecting.key.toggleore.name:0
|
||||
key_visualprospecting.key.togglefluid.name:0
|
||||
key_key.cofh.empower:0
|
||||
key_key.cofh.multimode:0
|
||||
key_key.fastBlockPlacing.desc:0
|
||||
key_key.control:0
|
||||
key_railcraft.keybind.loco.faster:0
|
||||
key_railcraft.keybind.loco.slower:0
|
||||
key_railcraft.keybind.loco.mode:0
|
||||
key_railcraft.keybind.loco.whistle:0
|
||||
key_key.journeymap.map_toggle:36
|
||||
key_key.journeymap.zoom_in:13
|
||||
key_key.journeymap.zoom_out:12
|
||||
key_key.journeymap.minimap_type:26
|
||||
key_key.journeymap.minimap_preset:43
|
||||
key_key.journeymap.create_waypoint:48
|
||||
key_key.craftpresence.config_keycode.name:0
|
||||
soundCategory_master:1.0
|
||||
soundCategory_music:0.0
|
||||
soundCategory_record:1.0
|
||||
soundCategory_weather:1.0
|
||||
soundCategory_block:1.0
|
||||
soundCategory_hostile:1.0
|
||||
soundCategory_neutral:1.0
|
||||
soundCategory_player:1.0
|
||||
soundCategory_ambient:1.0
|
||||
BIN
.minecraft/resourcepacks/GTNH-Faithful-x32.v0.9.18.1.zip
Normal file
BIN
.minecraft/resourcepacks/GTNH-Faithful-x32.v0.9.18.1.zip
Normal file
Binary file not shown.
BIN
.minecraft/resourcepacks/GTNHReflections-main.zip
Normal file
BIN
.minecraft/resourcepacks/GTNHReflections-main.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
.minecraft/resourcepacks/TransparentUI-main.zip
Normal file
BIN
.minecraft/resourcepacks/TransparentUI-main.zip
Normal file
Binary file not shown.
BIN
.minecraft/resourcepacks/mat_zen-35-1.2.2.zip
Normal file
BIN
.minecraft/resourcepacks/mat_zen-35-1.2.2.zip
Normal file
Binary file not shown.
BIN
.minecraft/resourcepacks/rhapsodia-0.6.1.zip
Normal file
BIN
.minecraft/resourcepacks/rhapsodia-0.6.1.zip
Normal file
Binary file not shown.
BIN
.minecraft/servers.dat
Normal file
BIN
.minecraft/servers.dat
Normal file
Binary file not shown.
98
.minecraft/shaderpacks/ComplementaryShaders_v4.6.txt
Normal file
98
.minecraft/shaderpacks/ComplementaryShaders_v4.6.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
#Mon Aug 21 16:10:16 EEST 2023
|
||||
ALTERNATIVE_COMMAND_BLOCK=true
|
||||
AMBIENT_GROUND=0.80
|
||||
AO_QUALITY=3
|
||||
BLOCKLIGHT_B=255
|
||||
BLOCKLIGHT_FLICKER=true
|
||||
BLOCKLIGHT_FLICKER_STRENGTH=0.10
|
||||
BLOCKLIGHT_G=240
|
||||
BLOCKLIGHT_I=0.40
|
||||
BLOCKLIGHT_R=240
|
||||
BLOOM_STRENGTH=1.00
|
||||
BLUE_SCREEN=true
|
||||
CLOUD_HEIGHT=20.0
|
||||
CLOUD_SPEED=0.50
|
||||
CLOUD_THICKNESS=3.00
|
||||
COLORED_SHADOWS=true
|
||||
COLOR_GRADING=true
|
||||
DIRECTIONAL_LIGHTMAP_STRENGTH=2.5
|
||||
DOF=1
|
||||
DOF_STRENGTH=256.0
|
||||
DYNAMIC_SHADER_LIGHT=false
|
||||
EMISSIVE_MULTIPLIER=0.30
|
||||
ENTITY_EFFECT=false
|
||||
FOG1_DISTANCE_M=1.20
|
||||
FOG1_TYPE=2
|
||||
FOG2_ALTITUDE_MODE=false
|
||||
FOG2_BRIGHTNESS=0.50
|
||||
FOG2_DISTANCE_M=1.20
|
||||
GENERATED_NORMALS=true
|
||||
GLOWING_LAPIS_BLOCK=true
|
||||
GLOWING_REDSTONE_BLOCK=true
|
||||
GREEN_SCREEN=true
|
||||
HAND_BLOOM_REDUCTION=true
|
||||
LAVA_VISIBILITY=true
|
||||
LENS_FLARE=true
|
||||
LENS_FLARE_STRENGTH=0.75
|
||||
LIGHT_DI=1.00
|
||||
LIGHT_GROUND=0.80
|
||||
LIGHT_MI=1.00
|
||||
LIGHT_SHAFT_DAY_RAIN_MULTIPLIER=1.60
|
||||
LIGHT_SHAFT_MODE=3
|
||||
LIGHT_SHAFT_NIGHT_MULTIPLIER=0.55
|
||||
LIGHT_SHAFT_NIGHT_RAIN_MULTIPLIER=2.10
|
||||
LIGHT_SHAFT_NOON_MULTIPLIER=0.70
|
||||
LIGHT_SHAFT_QUALITY=3
|
||||
LIGHT_SHAFT_THE_END_MULTIPLIER=0.40
|
||||
LIGHT_SHAFT_UNDERWATER_MULTIPLIER=1.10
|
||||
MIN_LIGHT=1024
|
||||
MOON_WATER_REF=3.00
|
||||
MOTION_BLUR_STRENGTH=0.25
|
||||
PARALLAX_DEPTH=0.80
|
||||
PARALLAX_DISTANCE=24
|
||||
PARALLAX_QUALITY=512
|
||||
PARTICLE_VISIBILITY=true
|
||||
PROJECTED_CAUSTICS=true
|
||||
PROMO_OUTLINE_THICKNESS=2
|
||||
REFLECTION_RAIN=true
|
||||
REFLECTION_ROUGH=false
|
||||
RP_SUPPORT=3
|
||||
SAFE_GENERATED_NORMALS=true
|
||||
SELECTION_MODE=2
|
||||
SELF_SHADOW_ANGLE=2.5
|
||||
SHADING_STRENGTH=0.90
|
||||
SHARPEN=1
|
||||
SKYBOX_BRIGHTNESS=0.25
|
||||
SKY_DAY=0.50
|
||||
SKY_MULT_I=0.50
|
||||
SKY_NOON=0.60
|
||||
STAR_AMOUNT=2
|
||||
STAR_BRIGHTNESS=4.00
|
||||
SUN_GLARE_STRENGTH=0.3
|
||||
SUN_MOON_WATER_REF=32.0
|
||||
UNDERWATER_I=1.30
|
||||
VIGNETTE=0
|
||||
VIGNETTE_STRENGTH=0.10
|
||||
WATERMARK_DURATION=999
|
||||
WATER_ABSORPTION=true
|
||||
WATER_BUMP=0.45
|
||||
WATER_DISPLACEMENT=true
|
||||
WATER_FOG=128.0
|
||||
WATER_G=236
|
||||
WATER_I=0.40
|
||||
WATER_NOISE_1=0.30
|
||||
WATER_NOISE_2=0.30
|
||||
WATER_NOISE_3=0.10
|
||||
WATER_NOISE_4=0.10
|
||||
WATER_OPACITY=0.25
|
||||
WATER_REFRACT=true
|
||||
WATER_SIZE=200.0
|
||||
WATER_SPEED=1.00
|
||||
WATER_V=0.1
|
||||
WAVING_LEAVES=true
|
||||
WAVING_LILY_PADS=true
|
||||
WAVING_VINES=true
|
||||
WEATHER_RI=1.00
|
||||
WORLD_TIME_ANIMATION=0
|
||||
shadowMapResolution=3072
|
||||
sunPathRotation=-20.0
|
||||
@@ -0,0 +1,27 @@
|
||||
Information:
|
||||
For questions, suggestions, early access, and more; feel free to join the Complementary Discord Server: https://discord.gg/A6faFYt
|
||||
If you encounter issues with mods, you can check out this mod issue fixes list: https://justpaste.it/60cgu
|
||||
|
||||
Credits:
|
||||
EminGT - The lead developer of Complementary
|
||||
Capt Tatsu - Complementary is based on his work, BSL Shaders
|
||||
Chocapic13 - Previous frame reprojection, jitter offset, ray tracer
|
||||
Robobo1221 - Volumetric light
|
||||
Horizon Zero Dawn - GGX area light approximation
|
||||
Simon Rodriguez - FXAA
|
||||
fayer3 - End portal/gateway shader
|
||||
Jessie - Dithering
|
||||
Builderb0y - Vanilla star detection
|
||||
Aldebaran S - Galaxy image
|
||||
|
||||
Dimensions:
|
||||
-1 NETHER - Nether
|
||||
0 OVERWORLD - Overworld
|
||||
1 END - End
|
||||
2 / -23 TWO - The Midnight
|
||||
5 / 7 SEVEN - Twilight Forest
|
||||
17 ONESEVEN - Atum
|
||||
20 SEVEN + TWENTY - The Betweenlands
|
||||
50...53 TWO + ABYSS - AbyssalCraft
|
||||
10 <empty> - Placeholder (The Beneath)
|
||||
-27..-31 <empty> - Placeholder (Galacticraft)
|
||||
60
.minecraft/shaderpacks/ComplementaryShaders_v4.6/License.txt
Normal file
60
.minecraft/shaderpacks/ComplementaryShaders_v4.6/License.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
Complementary Agreement 1.2
|
||||
===========================
|
||||
|
||||
0. Terminology
|
||||
--------------
|
||||
0.1. "The Pack" and/or "This Pack" means the software package that this
|
||||
specific agreement file you are reading from is found in.
|
||||
|
||||
0.2. "Normal Usage" means usage of The Pack as intended for the general
|
||||
public. This includes most usage, but the following usages are
|
||||
definitely NOT considered Normal Usage:
|
||||
a. Redistributing (parts of) The Pack
|
||||
b. Modifying code of The Pack
|
||||
|
||||
0.3. "User" and/or "Users" means people that are using The Pack under our
|
||||
definition of Normal Usage.
|
||||
|
||||
0.4. "Modpack" means a modification package made for the video
|
||||
game "Minecraft: Java Edition".
|
||||
|
||||
0.5. "Modified Pack" means a software package that consists of The Pack but
|
||||
with the code intentionally being changed to differ from The Pack.
|
||||
|
||||
1. Grants
|
||||
---------
|
||||
1.1. All Users are free to use This Pack for Normal Usage. This isn't
|
||||
limited to, but includes:
|
||||
a. Using The Pack for gameplay
|
||||
b. Using The Pack for content creation
|
||||
|
||||
1.2. This Pack is allowed to be redistributed inside a Modpack as long as
|
||||
the following conditions are met:
|
||||
a. This Pack must be visibly credited in the Modpack's description
|
||||
page(s).
|
||||
b. The author of the Modpack must acknowledge that any problems that
|
||||
may arise from using This Pack in their Modpack is entirely under
|
||||
the responsibility of the author of the Modpack.
|
||||
|
||||
1.3. This Pack is allowed to be redistributed as a Modified Pack as long as
|
||||
the following conditions are met:
|
||||
a. This Pack must be visibly credited in the description page(s) of
|
||||
the Modified Pack.
|
||||
b. This agreement file must still be left inside the Modified Pack
|
||||
without any changes being made to it.
|
||||
c. The Modified Pack must not have the word "Complementary" in it's
|
||||
name, and there should be at least 3 character difference between
|
||||
the name of the Modified Pack and This Pack. Adding or removing
|
||||
invisible characters or the removal of "Complementary" does not
|
||||
count as a character difference.
|
||||
This section (1.3) covers any forks of The Pack as long as the intent
|
||||
is modification.
|
||||
|
||||
2. Denied Cases
|
||||
---------------
|
||||
2.1. The Pack is NOT allowed to be redistributed unless the case falls under
|
||||
the sections 1.2 or 1.3 in this agreement.
|
||||
|
||||
2.2. This agreement only applies to the version of This Pack that this exact
|
||||
file can be found in. This agreement is not valid for future or past
|
||||
versions of The Pack unless they contain the exact same agreement.
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite1.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite1.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite2.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite2.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite3.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite3.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite4.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite4.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite5.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite5.glsl"
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 130
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite6.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite6.glsl"
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 130
|
||||
|
||||
#define FSH
|
||||
|
||||
#include "/program/composite7.glsl"
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 130
|
||||
|
||||
#define VSH
|
||||
|
||||
#include "/program/composite7.glsl"
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 130
|
||||
|
||||
#define FSH
|
||||
|
||||
#include "/program/deferred.glsl"
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 130
|
||||
|
||||
#define VSH
|
||||
|
||||
#include "/program/deferred.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define DEFERRED
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/deferred1.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/deferred1.glsl"
|
||||
@@ -0,0 +1,32 @@
|
||||
#if MC_VERSION >= 11300
|
||||
|
||||
#1.13+ Mapping
|
||||
|
||||
entity.18=minecraft:item_frame minecraft:painting minecraft:glow_item_frame
|
||||
entity.19=minecraft:frog
|
||||
entity.1001=minecraft:ender_dragon
|
||||
entity.1089=minecraft:boat minecraft:chest_boat
|
||||
entity.10101=minecraft:lightning_bolt
|
||||
entity.10001=minecraft:experience_orb
|
||||
entity.10201=minecraft:end_crystal
|
||||
entity.10202=minecraft:endermite
|
||||
entity.10203=minecraft:witch
|
||||
entity.10204=minecraft:blaze
|
||||
entity.10205=minecraft:wither minecraft:wither_skull
|
||||
entity.10206=minecraft:magma_cube
|
||||
entity.10207=minecraft:vex
|
||||
entity.10208=minecraft:creeper
|
||||
entity.10209=minecraft:drowned
|
||||
entity.10210=minecraft:stray
|
||||
entity.10211=minecraft:ghast
|
||||
entity.10212=minecraft:fireball minecraft:dragon_fireball
|
||||
entity.10213=minecraft:glow_squid
|
||||
entity.10214=minecraft:allay
|
||||
entity.10220=minecraft:warden
|
||||
entity.11001=minecraft:enderman
|
||||
|
||||
#else
|
||||
|
||||
entity.10101=minecraft:lightning_bolt
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/final.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/final.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_armor_glint.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_armor_glint.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_basic.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_basic.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_beaconbeam.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_beaconbeam.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_BLOCK
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_block.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_block.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_clouds.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_clouds.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_damagedblock.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_damagedblock.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_ENTITIES
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_entities.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_entities.glsl"
|
||||
@@ -0,0 +1,8 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_ENTITIES
|
||||
#define GBUFFERS_ENTITIES_GLOWING
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_entities.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_ENTITIES_GLOWING
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_entities.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_HAND
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_hand.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_hand.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
#define GBUFFERS_LINE
|
||||
|
||||
#include "/program/gbuffers_basic.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
#define GBUFFERS_LINE
|
||||
|
||||
#include "/program/gbuffers_basic.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define GBUFFERS_SKYBASIC
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_skybasic.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_skybasic.glsl"
|
||||
@@ -0,0 +1,8 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#define GBUFFERS_SKYTEXTURED
|
||||
|
||||
#include "/program/gbuffers_skytextured.glsl"
|
||||
@@ -0,0 +1,8 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#define GBUFFERS_SKYTEXTURED
|
||||
|
||||
#include "/program/gbuffers_skytextured.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_spidereyes.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_spidereyes.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_TERRAIN
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_terrain.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
#define GBUFFERS_TERRAIN
|
||||
|
||||
#include "/program/gbuffers_terrain.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_textured.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_textured.glsl"
|
||||
@@ -0,0 +1,8 @@
|
||||
#version 130
|
||||
|
||||
#define GBUFFERS_WATER
|
||||
#define OVERWORLD
|
||||
#define WATER
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_water.glsl"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define WATER
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_water.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define FSH
|
||||
|
||||
#include "/program/gbuffers_weather.glsl"
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 130
|
||||
|
||||
#define OVERWORLD
|
||||
#define VSH
|
||||
|
||||
#include "/program/gbuffers_weather.glsl"
|
||||
@@ -0,0 +1,30 @@
|
||||
#if MC_VERSION >= 11300
|
||||
|
||||
#1.13+ Mapping
|
||||
|
||||
item.358=minecraft:filled_map
|
||||
|
||||
item.11001=minecraft:glowstone
|
||||
item.11002=minecraft:sea_lantern
|
||||
item.11004=minecraft:shroomlight
|
||||
item.11007=minecraft:jack_o_lantern
|
||||
item.11008=minecraft:beacon
|
||||
item.11009=minecraft:end_rod
|
||||
item.11012=minecraft:redstone_torch
|
||||
item.11017=minecraft:lantern
|
||||
item.11018=minecraft:soul_lantern
|
||||
item.11021=minecraft:torch
|
||||
item.11022=minecraft:soul_torch
|
||||
item.11023=minecraft:crying_obsidian minecraft:respawn_anchor
|
||||
item.11024=minecraft:campfire
|
||||
item.11025=minecraft:soul_campfire
|
||||
|
||||
item.12001=minecraft:lava_bucket
|
||||
|
||||
item.13001=minecraft:spider_eye minecraft:fermented_spider_eye
|
||||
|
||||
#else
|
||||
|
||||
item.358=minecraft:filled_map
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,153 @@
|
||||
//FXAA 3.11 from http://blog.simonrodriguez.fr/articles/30-07-2016_implementing_fxaa.html
|
||||
float quality[12] = float[12] (1.0, 1.0, 1.0, 1.0, 1.0, 1.5, 2.0, 2.0, 2.0, 2.0, 4.0, 8.0);
|
||||
|
||||
void FXAA311(inout vec3 color) {
|
||||
float edgeThresholdMin = 0.03125;
|
||||
float edgeThresholdMax = 0.0625;
|
||||
float subpixelQuality = 0.75;
|
||||
int iterations = 12;
|
||||
|
||||
vec2 view = 1.0 / vec2(viewWidth, viewHeight);
|
||||
|
||||
float lumaCenter = GetLuminance(color);
|
||||
float lumaDown = GetLuminance(texture2D(colortex1, texCoord + vec2( 0.0, -1.0) * view).rgb);
|
||||
float lumaUp = GetLuminance(texture2D(colortex1, texCoord + vec2( 0.0, 1.0) * view).rgb);
|
||||
float lumaLeft = GetLuminance(texture2D(colortex1, texCoord + vec2(-1.0, 0.0) * view).rgb);
|
||||
float lumaRight = GetLuminance(texture2D(colortex1, texCoord + vec2( 1.0, 0.0) * view).rgb);
|
||||
|
||||
float lumaMin = min(lumaCenter, min(min(lumaDown, lumaUp), min(lumaLeft, lumaRight)));
|
||||
float lumaMax = max(lumaCenter, max(max(lumaDown, lumaUp), max(lumaLeft, lumaRight)));
|
||||
|
||||
float lumaRange = lumaMax - lumaMin;
|
||||
|
||||
if (lumaRange > max(edgeThresholdMin, lumaMax * edgeThresholdMax)) {
|
||||
float lumaDownLeft = GetLuminance(texture2D(colortex1, texCoord + vec2(-1.0, -1.0) * view).rgb);
|
||||
float lumaUpRight = GetLuminance(texture2D(colortex1, texCoord + vec2( 1.0, 1.0) * view).rgb);
|
||||
float lumaUpLeft = GetLuminance(texture2D(colortex1, texCoord + vec2(-1.0, 1.0) * view).rgb);
|
||||
float lumaDownRight = GetLuminance(texture2D(colortex1, texCoord + vec2( 1.0, -1.0) * view).rgb);
|
||||
|
||||
float lumaDownUp = lumaDown + lumaUp;
|
||||
float lumaLeftRight = lumaLeft + lumaRight;
|
||||
|
||||
float lumaLeftCorners = lumaDownLeft + lumaUpLeft;
|
||||
float lumaDownCorners = lumaDownLeft + lumaDownRight;
|
||||
float lumaRightCorners = lumaDownRight + lumaUpRight;
|
||||
float lumaUpCorners = lumaUpRight + lumaUpLeft;
|
||||
|
||||
float edgeHorizontal = abs(-2.0 * lumaLeft + lumaLeftCorners ) +
|
||||
abs(-2.0 * lumaCenter + lumaDownUp ) * 2.0 +
|
||||
abs(-2.0 * lumaRight + lumaRightCorners);
|
||||
float edgeVertical = abs(-2.0 * lumaUp + lumaUpCorners ) +
|
||||
abs(-2.0 * lumaCenter + lumaLeftRight ) * 2.0 +
|
||||
abs(-2.0 * lumaDown + lumaDownCorners );
|
||||
|
||||
bool isHorizontal = (edgeHorizontal >= edgeVertical);
|
||||
|
||||
float luma1 = isHorizontal ? lumaDown : lumaLeft;
|
||||
float luma2 = isHorizontal ? lumaUp : lumaRight;
|
||||
float gradient1 = luma1 - lumaCenter;
|
||||
float gradient2 = luma2 - lumaCenter;
|
||||
|
||||
bool is1Steepest = abs(gradient1) >= abs(gradient2);
|
||||
float gradientScaled = 0.25 * max(abs(gradient1), abs(gradient2));
|
||||
|
||||
float stepLength = isHorizontal ? view.y : view.x;
|
||||
|
||||
float lumaLocalAverage = 0.0;
|
||||
|
||||
if (is1Steepest) {
|
||||
stepLength = - stepLength;
|
||||
lumaLocalAverage = 0.5 * (luma1 + lumaCenter);
|
||||
} else {
|
||||
lumaLocalAverage = 0.5 * (luma2 + lumaCenter);
|
||||
}
|
||||
|
||||
vec2 currentUv = texCoord;
|
||||
if (isHorizontal) {
|
||||
currentUv.y += stepLength * 0.5;
|
||||
} else {
|
||||
currentUv.x += stepLength * 0.5;
|
||||
}
|
||||
|
||||
vec2 offset = isHorizontal ? vec2(view.x, 0.0) : vec2(0.0, view.y);
|
||||
|
||||
vec2 uv1 = currentUv - offset;
|
||||
vec2 uv2 = currentUv + offset;
|
||||
|
||||
float lumaEnd1 = GetLuminance(texture2D(colortex1, uv1).rgb);
|
||||
float lumaEnd2 = GetLuminance(texture2D(colortex1, uv2).rgb);
|
||||
lumaEnd1 -= lumaLocalAverage;
|
||||
lumaEnd2 -= lumaLocalAverage;
|
||||
|
||||
bool reached1 = abs(lumaEnd1) >= gradientScaled;
|
||||
bool reached2 = abs(lumaEnd2) >= gradientScaled;
|
||||
bool reachedBoth = reached1 && reached2;
|
||||
|
||||
if (!reached1) {
|
||||
uv1 -= offset;
|
||||
}
|
||||
if (!reached2) {
|
||||
uv2 += offset;
|
||||
}
|
||||
|
||||
if (!reachedBoth) {
|
||||
for(int i = 2; i < iterations; i++) {
|
||||
if (!reached1) {
|
||||
lumaEnd1 = GetLuminance(texture2D(colortex1, uv1).rgb);
|
||||
lumaEnd1 = lumaEnd1 - lumaLocalAverage;
|
||||
}
|
||||
if (!reached2) {
|
||||
lumaEnd2 = GetLuminance(texture2D(colortex1, uv2).rgb);
|
||||
lumaEnd2 = lumaEnd2 - lumaLocalAverage;
|
||||
}
|
||||
|
||||
reached1 = abs(lumaEnd1) >= gradientScaled;
|
||||
reached2 = abs(lumaEnd2) >= gradientScaled;
|
||||
reachedBoth = reached1 && reached2;
|
||||
|
||||
if (!reached1) {
|
||||
uv1 -= offset * quality[i];
|
||||
}
|
||||
if (!reached2) {
|
||||
uv2 += offset * quality[i];
|
||||
}
|
||||
|
||||
if (reachedBoth) break;
|
||||
}
|
||||
}
|
||||
|
||||
float distance1 = isHorizontal ? (texCoord.x - uv1.x) : (texCoord.y - uv1.y);
|
||||
float distance2 = isHorizontal ? (uv2.x - texCoord.x) : (uv2.y - texCoord.y);
|
||||
|
||||
bool isDirection1 = distance1 < distance2;
|
||||
float distanceFinal = min(distance1, distance2);
|
||||
|
||||
float edgeThickness = (distance1 + distance2);
|
||||
|
||||
float pixelOffset = - distanceFinal / edgeThickness + 0.5;
|
||||
|
||||
bool isLumaCenterSmaller = lumaCenter < lumaLocalAverage;
|
||||
|
||||
bool correctVariation = ((isDirection1 ? lumaEnd1 : lumaEnd2) < 0.0) != isLumaCenterSmaller;
|
||||
|
||||
float finalOffset = correctVariation ? pixelOffset : 0.0;
|
||||
|
||||
float lumaAverage = (1.0 / 12.0) * (2.0 * (lumaDownUp + lumaLeftRight) + lumaLeftCorners + lumaRightCorners);
|
||||
float subPixelOffset1 = clamp(abs(lumaAverage - lumaCenter) / lumaRange, 0.0, 1.0);
|
||||
float subPixelOffset2 = (-2.0 * subPixelOffset1 + 3.0) * subPixelOffset1 * subPixelOffset1;
|
||||
float subPixelOffsetFinal = subPixelOffset2 * subPixelOffset2 * subpixelQuality;
|
||||
|
||||
finalOffset = max(finalOffset, subPixelOffsetFinal);
|
||||
|
||||
|
||||
// Compute the final UV coordinates.
|
||||
vec2 finalUv = texCoord;
|
||||
if (isHorizontal) {
|
||||
finalUv.y += finalOffset * stepLength;
|
||||
} else {
|
||||
finalUv.x += finalOffset * stepLength;
|
||||
}
|
||||
|
||||
color = texture2D(colortex1, finalUv).rgb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Complementary Shaders by EminGT, based on BSL Shaders by Capt Tatsu
|
||||
*/
|
||||
|
||||
#include "/lib/util/reprojection.glsl"
|
||||
|
||||
ivec2 neighbourhoodOffsets[8] = ivec2[8](
|
||||
ivec2(-1, -1),
|
||||
ivec2( 0, -1),
|
||||
ivec2( 1, -1),
|
||||
ivec2(-1, 0),
|
||||
ivec2( 1, 0),
|
||||
ivec2(-1, 1),
|
||||
ivec2( 0, 1),
|
||||
ivec2( 1, 1)
|
||||
);
|
||||
|
||||
void NeighbourhoodClamping(vec3 color, inout vec3 tempColor, float depth, inout float edge) {
|
||||
vec3 minclr = color, maxclr = color;
|
||||
|
||||
ivec2 texelCoord = ivec2(gl_FragCoord.xy);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float depthCheck = texelFetch(depthtex1, texelCoord + neighbourhoodOffsets[i], 0).r;
|
||||
if (abs(GetLinearDepth(depthCheck) - GetLinearDepth(depth)) > 0.09) edge = 0.25;
|
||||
vec3 clr = texelFetch(colortex1, texelCoord + neighbourhoodOffsets[i], 0).rgb;
|
||||
minclr = min(minclr, clr); maxclr = max(maxclr, clr);
|
||||
}
|
||||
|
||||
tempColor = clamp(tempColor, minclr, maxclr);
|
||||
}
|
||||
|
||||
void TAA(inout vec3 color, inout vec4 temp) {
|
||||
float depth = texture2D(depthtex1, texCoord).r;
|
||||
float noTAA = texture2D(colortex7, texCoord).r;
|
||||
if (depth < 0.56 || noTAA > 0.5) { // Fixes entities and hand
|
||||
return;
|
||||
}
|
||||
|
||||
vec3 coord = vec3(texCoord, depth);
|
||||
vec2 prvCoord = Reprojection(coord);
|
||||
|
||||
vec2 view = vec2(viewWidth, viewHeight);
|
||||
vec3 tempColor = texture2D(colortex2, prvCoord).gba;
|
||||
if (tempColor == vec3(0.0)) { // Fixes the first frame
|
||||
temp = vec4(temp.r, color);
|
||||
return;
|
||||
}
|
||||
|
||||
float edge = 0.0;
|
||||
NeighbourhoodClamping(color, tempColor, depth, edge);
|
||||
|
||||
vec2 velocity = (texCoord - prvCoord.xy) * view;
|
||||
|
||||
float blendFactor = float(prvCoord.x > 0.0 && prvCoord.x < 1.0 &&
|
||||
prvCoord.y > 0.0 && prvCoord.y < 1.0);
|
||||
#if AA == 2 || AA == 3
|
||||
float blendMinimum = 0.3;
|
||||
#elif AA == 4
|
||||
float blendMinimum = 0.6;
|
||||
#endif
|
||||
float blendVariable = 0.25;
|
||||
float blendConstant = 0.65;
|
||||
|
||||
float lengthVelocity = length(velocity) * 50;
|
||||
blendFactor *= max(exp(-lengthVelocity) * blendVariable + blendConstant - lengthVelocity * edge, blendMinimum);
|
||||
|
||||
color = mix(color, tempColor, blendFactor);
|
||||
temp = vec4(temp.r, color);
|
||||
//if (edge > 0.05) color.rgb = vec3(1.0, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
#if MC_VERSION >= 11900
|
||||
uniform float darknessFactor;
|
||||
#endif
|
||||
|
||||
#ifdef OVERWORLD
|
||||
#include "/lib/atmospherics/sunGlare.glsl"
|
||||
#endif
|
||||
|
||||
vec3 Fog1(vec3 color, float lWorldPos, float lViewPos, vec3 nViewPos, vec3 extra, float NdotU) {
|
||||
#if defined OVERWORLD && !defined ONESEVEN && !defined TWO
|
||||
#if FOG1_TYPE < 2
|
||||
float fog = lWorldPos / far * (1.0/FOG1_DISTANCE_M);
|
||||
#else
|
||||
float fog = lViewPos / far * (1.025/FOG1_DISTANCE_M);
|
||||
#endif
|
||||
|
||||
fog *= fog;
|
||||
fog *= fog;
|
||||
fog *= fog * fog;
|
||||
fog = 1.0 - exp(-6.0 * fog);
|
||||
|
||||
if (fog > 0.0) {
|
||||
vec3 artificialFogColor = GetSkyColor(lightCol, NdotU, nViewPos, false);
|
||||
artificialFogColor = SunGlare(artificialFogColor, nViewPos, lightCol);
|
||||
#ifdef CAVE_SKY_FIX
|
||||
artificialFogColor *= 1.0 - isEyeInCave;
|
||||
#endif
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fog);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined NETHER && defined NETHER_FOG // extra = nether smoke (if enabled)
|
||||
#if FOG1_TYPE > 0
|
||||
float fog = lViewPos / far * (1.0/FOG1_DISTANCE_M);
|
||||
#else
|
||||
float fog = lWorldPos / far * (1.0/FOG1_DISTANCE_M);
|
||||
#endif
|
||||
fog *= fog;
|
||||
fog *= fog;
|
||||
fog = 1.0 - exp(-8.0 * fog);
|
||||
|
||||
vec3 artificialFogColor = pow((netherCol * 2.5) / NETHER_I, vec3(2.2)) * 4;
|
||||
#ifdef NETHER_SMOKE
|
||||
artificialFogColor += extra * fog;
|
||||
#endif
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fog);
|
||||
#endif
|
||||
|
||||
#ifdef END // extra = ender nebula (if enabled)
|
||||
float fog = lWorldPos / far * (1.5/FOG1_DISTANCE_M);
|
||||
fog = 1.0 - exp(-0.1 * pow(fog, 10.0));
|
||||
if (fog > 0.0) {
|
||||
vec3 artificialFogColor = endCol * (0.035 + 0.02 * vsBrightness);
|
||||
#ifdef ENDER_NEBULA
|
||||
artificialFogColor += extra * fog;
|
||||
#endif
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fog);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TWO
|
||||
float fog = lWorldPos / far * (4.0/FOG1_DISTANCE_M);
|
||||
fog = 1.0 - exp(-0.1 * pow(fog, 3.0));
|
||||
|
||||
//float NdotU = 1.0 - max(dot(nViewPos, upVec), 0.0);
|
||||
NdotU = 1.0 - max(NdotU, 0.0);
|
||||
NdotU = NdotU * NdotU;
|
||||
#ifndef ABYSS
|
||||
vec3 midnightPurple = vec3(0.0003, 0.0004, 0.002) * 1.25;
|
||||
vec3 midnightFogColor = fogColor * fogColor * 0.3;
|
||||
#else
|
||||
vec3 midnightPurple = skyColor * skyColor * 0.00075;
|
||||
vec3 midnightFogColor = fogColor * fogColor * 0.09;
|
||||
#endif
|
||||
vec3 artificialFogColor = mix(midnightPurple, midnightFogColor, NdotU);
|
||||
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fog);
|
||||
#endif
|
||||
|
||||
#ifdef SEVEN
|
||||
float fog = lWorldPos / far * (1.5/FOG1_DISTANCE_M);
|
||||
fog = 1.0 - exp(-0.1 * pow(fog, 10.0));
|
||||
float cosT = dot(nViewPos, upVec);
|
||||
vec3 twilightPurple = vec3(0.005, 0.006, 0.018);
|
||||
vec3 twilightGreen = vec3(0.015, 0.03, 0.02);
|
||||
#ifdef TWENTY
|
||||
twilightPurple = twilightGreen * 0.1;
|
||||
#endif
|
||||
vec3 artificialFogColor = 2 * (twilightPurple * 2 * clamp(pow(cosT, 0.7), 0.0, 1.0) + twilightGreen * (1-clamp(pow(cosT, 0.7), 0.0, 1.0)));
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fog);
|
||||
#endif
|
||||
|
||||
#ifdef ONESEVEN
|
||||
float fogoneseven = lWorldPos / 16 * (1.35-sunVisibility*0.35);
|
||||
fogoneseven = 1.0 - exp(-0.1 * pow(fogoneseven, 3.0));
|
||||
|
||||
if (fogoneseven > 0.0) {
|
||||
vec3 artificialFogColor = GetSkyColor(lightCol, NdotU, nViewPos, false);
|
||||
artificialFogColor = SunGlare(artificialFogColor, nViewPos, lightCol);
|
||||
color.rgb = mix(color.rgb, artificialFogColor, fogoneseven);
|
||||
}
|
||||
#endif
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
vec3 Fog2(vec3 color, float lViewPos, vec3 worldPos) {
|
||||
|
||||
#ifdef OVERWORLD
|
||||
#ifdef FOG2_ALTITUDE_MODE
|
||||
float altitudeFactor = (worldPos.y + eyeAltitude + 1000.0 - FOG2_ALTITUDE) * 0.001;
|
||||
if (altitudeFactor > 0.965 && altitudeFactor < 1.0) altitudeFactor = pow(altitudeFactor, 1.0 - (altitudeFactor - 0.965) * 28.57);
|
||||
altitudeFactor = clamp(pow(altitudeFactor, 20.0), 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
//duplicate 307309760
|
||||
float fog2 = lViewPos / pow(far, 0.25) * 0.112 * (1.0 + rainStrengthS * FOG2_RAIN_DISTANCE_M)
|
||||
* (1.0 - sunVisibility * 0.25 * (1.0 - rainStrengthS)) / FOG2_DISTANCE_M;
|
||||
fog2 = (1.0 - (exp(-50.0 * pow(fog2*0.125, 3.25) * eBS)));
|
||||
fog2 *= min(FOG2_OPACITY * (3.0 + rainStrengthS * FOG2_RAIN_OPACITY_M - sunVisibility * 2.0), 1.0);
|
||||
#ifdef FOG2_ALTITUDE_MODE
|
||||
fog2 *= pow(clamp((eyeAltitude - FOG2_ALTITUDE*0.2) / FOG2_ALTITUDE, 0.0, 1.0), 2.5 - FOG2_RAIN_ALTITUDE_M * rainStrengthS * 2.5);
|
||||
fog2 *= 1.0 - altitudeFactor * (1.0 - FOG2_RAIN_ALTITUDE_M * rainStrengthS);
|
||||
#endif
|
||||
|
||||
float sunVisibility2 = sunVisibility * sunVisibility;
|
||||
float sunVisibility4 = sunVisibility2 * sunVisibility2;
|
||||
float sunVisibility8 = sunVisibility4 * sunVisibility4;
|
||||
float timeBrightness2 = sqrt1(timeBrightness);
|
||||
vec3 fogColor2 = mix(lightCol*0.5, skyColor*skyMult*1.25, timeBrightness2);
|
||||
fogColor2 = mix(ambientNight*ambientNight, fogColor2, sunVisibility8);
|
||||
if (rainStrengthS > 0.0) {
|
||||
float rainStrengthS2 = 1.0 - (1.0 - rainStrengthS) * (1.0 - rainStrengthS);
|
||||
vec3 rainFogColor = FOG2_RAIN_BRIGHTNESS_M * skyColCustom * (0.01 + 0.05 * sunVisibility8 + 0.1 * timeBrightness2);
|
||||
rainFogColor *= mix(SKY_RAIN_NIGHT, SKY_RAIN_DAY, sunVisibility);
|
||||
fogColor2 = mix(fogColor2, rainFogColor, rainStrengthS2);
|
||||
}
|
||||
fogColor2 *= FOG2_BRIGHTNESS;
|
||||
#ifdef CAVE_SKY_FIX
|
||||
fogColor2 *= 1.0 - isEyeInCave;
|
||||
#endif
|
||||
|
||||
color.rgb = mix(color.rgb, fogColor2, fog2);
|
||||
#endif
|
||||
|
||||
#ifdef END
|
||||
float fog2 = lViewPos / pow(far, 0.25) * 0.035 * (32.0/FOG2_END_DISTANCE_M);
|
||||
fog2 = 1.0 - (exp(-50.0 * pow(fog2*0.125, 4.0)));
|
||||
#ifdef FOG2_ALTITUDE_MODE
|
||||
float altitudeFactor = clamp((worldPos.y + eyeAltitude + 100.0 - FOG2_END_ALTITUDE) * 0.01, 0.0, 1.0);
|
||||
if (altitudeFactor > 0.75 && altitudeFactor < 1.0) altitudeFactor = pow(altitudeFactor, 1.0 - (altitudeFactor - 0.75) * 4.0);
|
||||
fog2 *= 1.0 - altitudeFactor;
|
||||
#endif
|
||||
fog2 = clamp(fog2, 0.0, 0.125) * (7.0 + fog2);
|
||||
fog2 = 1 - pow(1 - fog2, 2.0 - fog2);
|
||||
vec3 fogColor2 = endCol * (0.035 + 0.02 * vsBrightness);
|
||||
color.rgb = mix(color.rgb, fogColor2 * FOG2_END_BRIGHTNESS, fog2 * FOG2_END_OPACITY);
|
||||
#endif
|
||||
|
||||
#if defined SEVEN && !defined TWENTY
|
||||
float fog2 = lViewPos / pow(far, 0.25) * 0.035 * (1.0 + rainStrengthS) * (3.2/FOG2_DISTANCE_M);
|
||||
fog2 = 1.0 - (exp(-50.0 * pow(fog2*0.125, 4.0) * eBS));
|
||||
float altitudeFactor = (worldPos.y + eyeAltitude + 1000.0 - 90 * (1 + rainStrengthS*0.5)) * 0.001;
|
||||
if (altitudeFactor > 0.965 && altitudeFactor < 1.0) altitudeFactor = pow(altitudeFactor, 1.0 - (altitudeFactor - 0.965) * 28.57);
|
||||
fog2 *= 1.0 - altitudeFactor;
|
||||
fog2 = clamp(fog2, 0.0, 0.125) * (7.0 + fog2);
|
||||
vec3 fogColor2 = vec3(0.015, 0.03, 0.02);
|
||||
color.rgb = mix(color.rgb, fogColor2, fog2 * 0.80);
|
||||
#endif
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
vec3 WaterFog(vec3 color, float lViewPos, float fogrange) {
|
||||
float fog = lViewPos / fogrange;
|
||||
fog = 1.0 - exp(-3.0 * fog * fog);
|
||||
color *= pow(max(underwaterColor.rgb, vec3(0.1)), vec3(0.5)) * 3.0;
|
||||
color = mix(color, 0.8 * pow(underwaterColor.rgb * (1.0 - blindFactor), vec3(2.0)), fog);
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
vec3 LavaFog(vec3 color, float lViewPos) {
|
||||
#ifndef LAVA_VISIBILITY
|
||||
float fog = (lViewPos - gl_Fog.start) * gl_Fog.scale;
|
||||
fog *= fog;
|
||||
fog = 1.0 - exp(- fog);
|
||||
fog = clamp(fog, 0.0, 1.0);
|
||||
#else
|
||||
float fog = lViewPos * 0.02;
|
||||
fog = 1.0 - exp(-3.0 * fog);
|
||||
#if MC_VERSION >= 11700
|
||||
if (gl_Fog.start / far < 0.0) fog = min(lViewPos * 0.01, 1.0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//duplicate 792763950
|
||||
#ifndef VANILLA_UNDERLAVA_COLOR
|
||||
vec3 lavaFogColor = vec3(0.6, 0.35, 0.15);
|
||||
#else
|
||||
vec3 lavaFogColor = pow(fogColor, vec3(2.2));
|
||||
#endif
|
||||
color.rgb = mix(color.rgb, lavaFogColor, fog);
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
vec3 SnowFog(vec3 color, float lViewPos) {
|
||||
float fog = lViewPos * 0.3;
|
||||
fog = (1.0 - exp(-4.0 * fog * fog * fog));
|
||||
color.rgb = mix(color.rgb, vec3(0.1, 0.15, 0.2), fog);
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
vec3 BlindFog(vec3 color, float lViewPos) {
|
||||
float fog = lViewPos *0.04* (5.0 / blindFactor);
|
||||
fog = (1.0 - exp(-6.0 * fog * fog * fog)) * blindFactor;
|
||||
color.rgb = mix(color.rgb, vec3(0.0), fog);
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
|
||||
#if MC_VERSION >= 11900
|
||||
vec3 DarknessFog(vec3 color, float lViewPos) {
|
||||
float fog = lViewPos * 0.06;
|
||||
fog = (1.0 - exp(-6.0 * fog * fog * fog)) * darknessFactor;
|
||||
color.rgb = mix(color.rgb, darknessColor, fog);
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
#endif
|
||||
|
||||
vec3 startFog(vec3 color, vec3 nViewPos, float lViewPos, vec3 worldPos, vec3 extra, float NdotU) {
|
||||
#if !defined GBUFFER_CODING
|
||||
if (isEyeInWater == 0) {
|
||||
#ifdef FOG2
|
||||
color.rgb = Fog2(color.rgb, lViewPos, worldPos);
|
||||
#endif
|
||||
#ifdef FOG1
|
||||
color.rgb = Fog1(color.rgb, length(worldPos.xz), lViewPos, nViewPos, extra, NdotU);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (blindFactor < 0.001) {
|
||||
if (isEyeInWater == 1) color.rgb = WaterFog(color.rgb, lViewPos, waterFog * (1.0 + eBS));
|
||||
if (isEyeInWater == 2) color.rgb = LavaFog(color.rgb, lViewPos);
|
||||
#if MC_VERSION >= 11700
|
||||
if (isEyeInWater == 3) color.rgb = SnowFog(color.rgb, lViewPos);
|
||||
#endif
|
||||
} else color.rgb = BlindFog(color.rgb, lViewPos);
|
||||
#if MC_VERSION >= 11900
|
||||
if (darknessFactor > 0.001) color.rgb = DarknessFog(color.rgb, lViewPos);
|
||||
#endif
|
||||
|
||||
return color.rgb;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
float rainbowTime = sqrt3(max(pow2(pow2(sunVisibility * shadowFade)) - timeBrightness * 2.5, 0.0));
|
||||
#ifdef RAINBOW_AFTER_RAIN_CHECK
|
||||
rainbowTime *= sqrt3(max(wetness - 0.1, 0.0) * (1.0 - rainStrength) * (1.0 - rainStrengthS)) * isRainy;
|
||||
#endif
|
||||
|
||||
if (rainbowTime > 0.001) {
|
||||
float rainbowDistance = max(far, 256.0) * 0.25;
|
||||
float rainbowLength = max(far, 256.0) * 0.75;
|
||||
|
||||
vec3 rainbowTranslucent = translucent;
|
||||
if (water) rainbowTranslucent = vec3(float(isEyeInWater == 1));
|
||||
|
||||
vec4 viewPosZ1 = gbufferProjectionInverse * (vec4(texCoord, z1, 1.0) * 2.0 - 1.0);
|
||||
viewPosZ1 /= viewPosZ1.w;
|
||||
float lViewPosZ1 = length(viewPosZ1.xyz);
|
||||
float lViewPosZ0 = length(viewPos.xyz);
|
||||
|
||||
float rainbowCoord = 1.0 - (cosS + 0.75) / (0.0625 * RAINBOW_DIAMETER);
|
||||
|
||||
float rainbowFactor = clamp(1.0 - rainbowCoord, 0.0, 1.0) * clamp(rainbowCoord, 0.0, 1.0);
|
||||
rainbowFactor *= rainbowFactor * (3.0 - 2.0 * rainbowFactor);
|
||||
rainbowFactor *= min(max(lViewPosZ1 - rainbowDistance, 0.0) / rainbowLength, 1.0);
|
||||
rainbowFactor *= rainbowTime;
|
||||
#ifdef CAVE_SKY_FIX
|
||||
rainbowFactor *= 1.0 - isEyeInCave;
|
||||
#endif
|
||||
|
||||
if (rainbowFactor > 0.0) {
|
||||
#if RAINBOW_STYLE == 1
|
||||
float rainbowCoordM = pow(rainbowCoord, 1.4 + max(rainbowCoord - 0.5, 0.0) * 1.6);
|
||||
rainbowCoordM = smoothstep(0.0, 1.0, rainbowCoordM) * 0.85;
|
||||
rainbowCoordM += (dither - 0.5) * 0.1;
|
||||
vec3 rainbow = clamp(abs(mod(rainbowCoordM * 6.0 + vec3(-0.55,4.3,2.2) ,6.0)-3.0)-1.0, 0.0, 1.0);
|
||||
rainbowCoordM += 0.1;
|
||||
rainbow += clamp(abs(mod(rainbowCoordM * 6.0 + vec3(-0.55,4.3,2.2) ,6.0)-3.0)-1.0, 0.0, 1.0);
|
||||
rainbowCoordM -= 0.2;
|
||||
rainbow += clamp(abs(mod(rainbowCoordM * 6.0 + vec3(-0.55,4.3,2.2) ,6.0)-3.0)-1.0, 0.0, 1.0);
|
||||
rainbow /= 3.0;
|
||||
rainbow.r += pow2(max(rainbowCoord - 0.5, 0.0)) * (max(1.0 - rainbowCoord, 0.0)) * 26.0;
|
||||
rainbow = pow(rainbow, vec3(2.2)) * vec3(0.25, 0.075, 0.25) * 3.0;
|
||||
#else
|
||||
float rainbowCoordM = pow(rainbowCoord, 1.35);
|
||||
rainbowCoordM = smoothstep(0.0, 1.0, rainbowCoordM);
|
||||
vec3 rainbow = clamp(abs(mod(rainbowCoordM * 6.0 + vec3(0.0,4.0,2.0) ,6.0)-3.0)-1.0, 0.0, 1.0);
|
||||
rainbow *= rainbow * (3.0 - 2.0 * rainbow);
|
||||
rainbow = pow(rainbow, vec3(2.2)) * vec3(0.25, 0.075, 0.25) * 3.0;
|
||||
#endif
|
||||
|
||||
if (z1 > z0 && lViewPosZ0 < rainbowDistance + rainbowLength)
|
||||
rainbow *= mix(rainbowTranslucent, vec3(1.0),
|
||||
clamp((lViewPosZ0 - rainbowDistance) / rainbowLength, 0.0, 1.0)
|
||||
);
|
||||
if (isEyeInWater == 1) rainbow *= float(water) * 0.05;
|
||||
|
||||
color.rgb += rainbow * rainbowFactor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
vec3 GetSkyColor(vec3 lightCol, float NdotU, vec3 nViewPos, bool isReflection) {
|
||||
float timeBrightnessInv = 1.0 - timeBrightness;
|
||||
float timeBrightnessInv2 = timeBrightnessInv * timeBrightnessInv;
|
||||
float timeBrightnessInv4 = timeBrightnessInv2 * timeBrightnessInv2;
|
||||
float timeBrightnessInv8 = timeBrightnessInv4 * timeBrightnessInv4;
|
||||
|
||||
float NdotSp = clamp(dot(nViewPos, sunVec) * 0.5 + 0.5, 0.001, 1.0);
|
||||
float NdotS = NdotSp * NdotSp;
|
||||
NdotS *= NdotS;
|
||||
|
||||
float absNdotU = abs(NdotU);
|
||||
|
||||
vec3 skyColor2 = skyColor * skyColor;
|
||||
|
||||
vec3 sky = mix(sqrt1(skyColor) * 0.47, skyColor2 * 0.9, absNdotU);
|
||||
sky = sky * (0.5 + 0.5 * sunVisibility) * skyMult;
|
||||
|
||||
#ifdef ONESEVEN
|
||||
sky = vec3(0.812, 0.741, 0.674) * 0.5;
|
||||
#endif
|
||||
|
||||
float horizon = 1.0 - max(NdotU + 0.1, 0.0) * (1.0 - 0.25 * NdotS * sunVisibility);
|
||||
horizon = min(horizon, 0.9);
|
||||
horizon *= horizon;
|
||||
|
||||
float lightmix = NdotS * max(1.0 - absNdotU * 2.0, 0.0) * 0.5 + horizon + 0.05;
|
||||
lightmix *= sunVisibility * (1.0 - rainStrengthS) * timeBrightnessInv8;
|
||||
|
||||
sky *= 2.0 - 0.5 * timeBrightnessInv4;
|
||||
sky *= mix(SKY_NOON, SKY_DAY, timeBrightnessInv4);
|
||||
|
||||
float mult = 0.1 * (1.0 + rainStrengthS) + horizon * (0.3 + 0.1 * sunVisibility);
|
||||
|
||||
float meFactorP = min((1.0 - min(moonBrightness, 0.6) / 0.6) * 0.115, 0.075);
|
||||
float meNdotU = 1.0 - absNdotU;
|
||||
float meFactor = meFactorP * meNdotU * meNdotU * 15.0 * max(timeBrightnessInv4 - rainStrengthS, 0.0);
|
||||
vec3 meColor = mix(lightMorning, lightEvening, mefade);
|
||||
meColor *= meColor;
|
||||
meColor *= meColor;
|
||||
meColor *= meFactor * meFactor * NdotS;
|
||||
|
||||
vec3 finalSky = mix(sky * (1.0 - pow2(lightmix)), lightCol * sqrt(lightCol), lightmix);
|
||||
|
||||
vec3 nightSky = ambientNight * ambientNight * (3.25 + 2.25 * max(sqrt1(NdotU), 0.0));
|
||||
nightSky *= mix(SKY_NIGHT, 1.0, sunVisibility);
|
||||
finalSky += nightSky;
|
||||
|
||||
finalSky *= max(1.0 - length(meColor) * 0.5, 0.0);
|
||||
finalSky += meColor * 0.8;
|
||||
|
||||
if (isReflection) {
|
||||
float invNdotU = max(-NdotU, 0.0);
|
||||
float groundFactor = 0.5 * (11.0 * rainStrengthS + 1.0) * (-5.0 * sunVisibility + 6.0);
|
||||
float ground = exp(-groundFactor / (invNdotU * 6.0));
|
||||
ground = smoothstep(0.0, 1.0, ground);
|
||||
mult *= (1.0 - ground);
|
||||
}
|
||||
|
||||
//duplicate 98765
|
||||
vec3 weatherSky = weatherCol * weatherCol;
|
||||
weatherSky *= GetLuminance(ambientCol / (weatherSky)) * 1.4;
|
||||
weatherSky *= mix(SKY_RAIN_NIGHT, SKY_RAIN_DAY, sunVisibility);
|
||||
weatherSky = max(weatherSky, skyColor2 * 0.75); // Lightning Sky Color
|
||||
weatherSky *= rainStrengthS;
|
||||
finalSky = mix(finalSky, weatherSky, rainStrengthS) * mult;
|
||||
|
||||
finalSky = pow(finalSky, vec3(1.125));
|
||||
|
||||
return finalSky;
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
#if !defined END && !defined SEVEN && !defined NETHER
|
||||
float CloudNoise(vec2 coord, vec2 wind) {
|
||||
float noise = texture2D(noisetex, coord*0.125 + wind * 0.25).x * 7.0;
|
||||
noise+= texture2D(noisetex, coord*0.0625 + wind * 0.15).x * 12.0;
|
||||
noise+= texture2D(noisetex, coord*0.03125 + wind * 0.05).x * 12.0;
|
||||
noise+= texture2D(noisetex, coord*0.015625 + wind * 0.05).x * 24.0;
|
||||
return noise * 0.34;
|
||||
}
|
||||
|
||||
float CloudCoverage(float noise, float coverage, float NdotU, float cosS) {
|
||||
float noiseCoverageCosS = abs(cosS);
|
||||
noiseCoverageCosS *= noiseCoverageCosS;
|
||||
noiseCoverageCosS *= noiseCoverageCosS;
|
||||
float NdotUmult = 0.365;
|
||||
#ifdef AURORA
|
||||
float auroraMult = max(1.0 - sunVisibility - rainStrengthS, 0.0);
|
||||
#ifdef AURORA_BIOME_CHECK
|
||||
auroraMult *= isSnowy;
|
||||
#endif
|
||||
#ifdef AURORA_FULL_MOON_CHECK
|
||||
auroraMult *= float(moonPhase == 0);
|
||||
#endif
|
||||
NdotUmult *= 1.0 + 2.5 * auroraMult;
|
||||
#endif
|
||||
float noiseCoverage = coverage * coverage + CLOUD_AMOUNT
|
||||
* (1.0 + noiseCoverageCosS * 0.175)
|
||||
* (1.0 + NdotU * NdotUmult * (1.0-rainStrengthS*3.0))
|
||||
- 2.5;
|
||||
|
||||
return max(noise - noiseCoverage, 0.0);
|
||||
}
|
||||
|
||||
vec4 DrawCloud(vec3 viewPos, float dither, vec3 lightCol, vec3 ambientCol, float NdotU, int sampleCount) {
|
||||
float cosS = dot(normalize(viewPos), sunVec);
|
||||
|
||||
#if AA > 1
|
||||
dither = fract(16.0 * frameTimeCounter + dither);
|
||||
#endif
|
||||
|
||||
float timeBrightnessS = sqrt1(timeBrightness);
|
||||
|
||||
float cloud = 0.0;
|
||||
float cloudGradient = 0.0;
|
||||
float gradientMix = dither * 0.1667;
|
||||
float colorMultiplier = CLOUD_BRIGHTNESS * (0.23 + 0.07 * timeBrightnessS);
|
||||
float noiseMultiplier = CLOUD_THICKNESS * 0.125;
|
||||
float scattering = 0.5 * pow(cosS * 0.5 * (2.0 * sunVisibility - 1.0) + 0.5, 6.0);
|
||||
|
||||
float cloudHeightFactor = max(1.11 - 0.0015 * eyeAltitude, 0.0);
|
||||
cloudHeightFactor *= cloudHeightFactor;
|
||||
float cloudHeight = CLOUD_HEIGHT * cloudHeightFactor * 0.5;
|
||||
|
||||
#if !defined GBUFFERS_WATER && !defined DEFERRED
|
||||
float skytime = frametime;
|
||||
#else
|
||||
float skytime = cloudtime;
|
||||
#endif
|
||||
float cloudSpeedFactor = 0.003;
|
||||
vec2 wind = vec2(skytime * CLOUD_SPEED * cloudSpeedFactor, 0.0);
|
||||
#ifdef SEVEN
|
||||
wind *= 8;
|
||||
#endif
|
||||
|
||||
vec3 cloudColor = vec3(0.0);
|
||||
|
||||
float stretchFactor = 2.5;
|
||||
float coordFactor = 0.009375;
|
||||
|
||||
if (NdotU > 0.025) { //duplicate 78634
|
||||
vec3 wpos = normalize((gbufferModelViewInverse * vec4(viewPos, 1.0)).xyz);
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
if (cloud > 0.99) break;
|
||||
vec2 planeCoord = wpos.xz * ((cloudHeight + (i + dither) * stretchFactor * 6.0 / sampleCount) / wpos.y) * 0.0085;
|
||||
vec2 coord = cameraPosition.xz * 0.00025 + planeCoord;
|
||||
|
||||
float ang1 = (i + frametime * 0.025) * 2.391;
|
||||
float ang2 = ang1 + 2.391;
|
||||
coord += mix(vec2(cos(ang1), sin(ang1)), vec2(cos(ang2), sin(ang2)), dither * 0.25 + 0.75) * coordFactor;
|
||||
|
||||
float coverage = float(i - 3.0 + dither) * 0.725;
|
||||
|
||||
float noise = CloudNoise(coord, wind);
|
||||
noise = CloudCoverage(noise, coverage, NdotU, cosS) * noiseMultiplier;
|
||||
noise = noise / sqrt(noise * noise + 1.0);
|
||||
|
||||
cloudGradient = mix(cloudGradient,
|
||||
mix(gradientMix * gradientMix, 1.0 - noise, 0.25),
|
||||
noise * (1.0 - cloud));
|
||||
|
||||
cloud += max(noise - cloud * 0.95, 0.0);
|
||||
cloud = mix(cloud, 1.0, rainStrengthS * pow2(noise * noise));
|
||||
gradientMix += 0.2 * (6.0 / sampleCount);
|
||||
}
|
||||
|
||||
float meFactorP = min((1.0 - min(moonBrightness, 0.6) / 0.6) * 0.115, 0.075);
|
||||
vec3 meColor = vec3(0.0);
|
||||
if (cosS > 0.0) {
|
||||
float meNdotU = 1.0 - NdotU;
|
||||
float meFactor = meFactorP * meNdotU * meNdotU * 12.0 * (1.0 - rainStrengthS);
|
||||
meColor = mix(lightMorning, lightEvening, mefade);
|
||||
meColor *= meColor;
|
||||
meColor *= meColor;
|
||||
meColor *= meFactor * meFactor * cosS;
|
||||
}
|
||||
|
||||
float sunVisibilityM = pow(sunVisibility, 4.0 - meFactorP * 24.0);
|
||||
vec3 skyColor2 = skyColor * skyColor;
|
||||
|
||||
vec3 cloudNightColor = ambientCol * 8.0;
|
||||
vec3 cloudDayColor = pow(lightCol, vec3(1.5)) * 1.5;
|
||||
vec3 cloudUpColor = mix(cloudNightColor, cloudDayColor, sunVisibilityM);
|
||||
cloudUpColor *= 1.0 + scattering;
|
||||
cloudUpColor += max(meColor, vec3(0.0));
|
||||
|
||||
vec3 cloudDownColor = skyColor2 * 0.225 * sunVisibility * skyMult;
|
||||
|
||||
//duplicate 98765
|
||||
vec3 weatherSky = weatherCol * weatherCol;
|
||||
weatherSky *= GetLuminance(ambientCol / (weatherSky)) * 1.4;
|
||||
weatherSky *= mix(SKY_RAIN_NIGHT, SKY_RAIN_DAY, sunVisibility);
|
||||
weatherSky = max(weatherSky, skyColor2 * 0.75); // Lightning Sky Color
|
||||
weatherSky *= rainStrengthS;
|
||||
#ifdef LIGHT_SHAFTS
|
||||
weatherSky *= 12.5 + scattering * 47.5 * (1.0 + sunVisibility);
|
||||
#else
|
||||
weatherSky *= 12.5 + scattering * 47.5;
|
||||
#endif
|
||||
cloudUpColor = mix(cloudUpColor, weatherSky, rainStrengthS * rainStrengthS);
|
||||
|
||||
cloudColor = mix(cloudDownColor, cloudUpColor, cloudGradient);
|
||||
|
||||
cloud *= pow2(pow2(1.0 - exp(- (10.0 - 8.2 * rainStrengthS) * NdotU))); //duplicate 78634
|
||||
}
|
||||
|
||||
return vec4(cloudColor * colorMultiplier, cloud * CLOUD_OPACITY);
|
||||
}
|
||||
|
||||
#ifdef AURORA
|
||||
float AuroraNoise(vec2 coord, vec2 wind) {
|
||||
float noise = texture2D(noisetex, coord * 0.175 + wind * 0.25).x;
|
||||
noise+= texture2D(noisetex, coord * 0.04375 + wind * 0.15).x * 5.0;
|
||||
|
||||
return noise;
|
||||
}
|
||||
|
||||
vec3 DrawAurora(vec3 viewPos, float dither, int sampleCount, float NdotU) {
|
||||
#if AA > 1
|
||||
dither = fract(16.0 * frameTimeCounter + dither);
|
||||
#endif
|
||||
|
||||
float gradientMix = dither / sampleCount;
|
||||
float visibility = (1.0 - sunVisibility) * (1.0 - rainStrengthS);
|
||||
visibility *= visibility;
|
||||
|
||||
#ifdef AURORA_BIOME_CHECK
|
||||
visibility *= isSnowy;
|
||||
#endif
|
||||
#ifdef AURORA_FULL_MOON_CHECK
|
||||
visibility *= float(moonPhase == 0);
|
||||
#endif
|
||||
|
||||
#if !defined GBUFFERS_WATER && !defined DEFERRED
|
||||
float skytime = frametime;
|
||||
#else
|
||||
float skytime = cloudtime;
|
||||
#endif
|
||||
|
||||
vec2 wind = vec2(skytime * 0.00005);
|
||||
|
||||
vec3 aurora = vec3(0.0);
|
||||
|
||||
float NdotUM = min(1.08 - NdotU, 1.0);
|
||||
NdotUM *= NdotUM;
|
||||
NdotUM = 1.0 - NdotUM * NdotUM;
|
||||
|
||||
if (NdotU > 0.0 && visibility > 0.0) {
|
||||
vec3 wpos = normalize((gbufferModelViewInverse * vec4(viewPos, 1.0)).xyz);
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
vec2 planeCoord = wpos.xz * ((8.0 * AURORA_HEIGHT + (i + dither) * 7.0 / sampleCount) / wpos.y) * 0.004;
|
||||
vec2 coord = cameraPosition.xz * 0.00001 + planeCoord;
|
||||
|
||||
float noise = AuroraNoise(coord, wind);
|
||||
noise = max(1.0 - 1.5 / (1.0 - NdotU * 0.8) * abs(noise - 3.0), 0.0);
|
||||
|
||||
if (noise > 0.0) {
|
||||
noise *= texture2D(noisetex, coord * 0.25 + wind * 0.25).x;
|
||||
noise *= 0.5 * texture2D(noisetex, coord + wind * 16.0).x + 0.75;
|
||||
noise = noise * noise * 3.0 / sampleCount;
|
||||
noise *= NdotUM;
|
||||
|
||||
vec3 auroracolor = mix(
|
||||
auroraDCol,
|
||||
auroraUCol,
|
||||
pow(gradientMix, 0.4));
|
||||
|
||||
aurora += noise * auroracolor * exp2(-6.0 * i / sampleCount);
|
||||
}
|
||||
gradientMix += 1.0 / sampleCount;
|
||||
}
|
||||
}
|
||||
|
||||
aurora = aurora * visibility * 1.5;
|
||||
|
||||
return aurora;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SEVEN
|
||||
float GetNoise(vec2 pos) {
|
||||
return fract(sin(dot(pos, vec2(12.9898, 4.1414))) * 43758.54953);
|
||||
}
|
||||
|
||||
vec3 DrawStars(inout vec3 color, vec3 viewPos, float NdotU) {
|
||||
vec3 wpos = vec3(gbufferModelViewInverse * vec4(viewPos, 1.0));
|
||||
vec3 planeCoord = 0.75 * wpos / (wpos.y + length(wpos.xz));
|
||||
vec2 wind = 0.75 * vec2(frametime, 0.0);
|
||||
#ifdef SEVEN
|
||||
wind = vec2(0.0);
|
||||
#endif
|
||||
vec2 coord = planeCoord.xz * 0.5 + wind * 0.00125;
|
||||
coord = floor(coord*1024.0) / 1024.0;
|
||||
|
||||
float multiplier = 5.0 * (1.0 - rainStrengthS) * (1 - (sunVisibility*0.9 + pow(timeBrightness, 0.05)*0.1)) * pow(NdotU, 2.0);
|
||||
|
||||
#ifdef SEVEN
|
||||
multiplier = sqrt2(NdotU) * 5.0 * (1.0 - rainStrengthS);
|
||||
#endif
|
||||
|
||||
float star = 1.0;
|
||||
if (NdotU > 0.0) {
|
||||
star *= GetNoise(coord.xy);
|
||||
star *= GetNoise(coord.xy+0.1);
|
||||
star *= GetNoise(coord.xy+0.23);
|
||||
}
|
||||
star = max(star - 0.825, 0.0) * multiplier;
|
||||
|
||||
vec3 stars = star * lightNight * lightNight * 160;
|
||||
|
||||
return vec3(stars);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined END && defined ENDER_NEBULA
|
||||
float GetNebulaStarNoise(vec2 pos) {
|
||||
return fract(sin(dot(pos, vec2(12.9898, 4.1414))) * 43758.54953);
|
||||
}
|
||||
|
||||
float NebulaNoise(vec2 coord, vec2 wind) {
|
||||
float noise = texture2D(noisetex, coord * 0.175 + wind * 0.25).x;
|
||||
noise+= texture2D(noisetex, coord * 0.04375 + wind * 0.15).x * 5.0;
|
||||
|
||||
return noise;
|
||||
}
|
||||
|
||||
vec3 DrawEnderNebula(vec3 viewPos, float dither, vec3 lightCol, inout vec3 nebulaStars) {
|
||||
float NdotU = dot(normalize(viewPos), upVec);
|
||||
|
||||
bool dragonBattle = gl_Fog.start / far < 0.5;
|
||||
//if (gl_FragCoord.x < 960) dragonBattle = false;
|
||||
//dragonBattle = true;
|
||||
|
||||
#if AA > 1
|
||||
dither = fract(16.0 * frameTimeCounter + dither);
|
||||
#endif
|
||||
|
||||
int sampleCount = 20;
|
||||
|
||||
float gradientMix = dither / sampleCount;
|
||||
|
||||
#if !defined GBUFFERS_WATER && !defined DEFERRED
|
||||
float skytime = frametime;
|
||||
#else
|
||||
float skytime = cloudtime;
|
||||
#endif
|
||||
|
||||
vec2 wind = vec2(skytime * 0.000035 * NEBULA_SPEED);
|
||||
|
||||
vec3 nebula = vec3(0.0);
|
||||
|
||||
float NdotUM = abs(NdotU);
|
||||
NdotUM = 1.0 - NdotUM;
|
||||
NdotUM = pow(NdotUM, (2.0 - NdotUM) * (NEBULA_DISTRIBUTION - 0.8)) * 0.85;
|
||||
NdotUM = max(NdotUM, 0.0);
|
||||
float compression = pow(NdotUM, NEBULA_COMPRESSION);
|
||||
dither *= dragonBattle ? 0.5 + 0.5 * NEBULA_SMOOTHING : NEBULA_SMOOTHING;
|
||||
|
||||
vec3 nebulaPurple = 12.0 * lightCol * NEBULA_PURPLE_BRIGHTNESS;
|
||||
vec3 nebulaOrange = endOrangeCol * NEBULA_ORANGE_BRIGHTNESS * 4.0;
|
||||
|
||||
vec3 wpos = normalize((gbufferModelViewInverse * vec4(viewPos * 1000.0, 1.0)).xyz);
|
||||
if (dragonBattle) {
|
||||
nebulaPurple *= 0.3;
|
||||
nebulaOrange *= 2.0;
|
||||
}
|
||||
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
vec2 planeCoord = wpos.xz * (1.0 + (i + dither) * compression * 6.0 / sampleCount) * NEBULA_SIZE;
|
||||
vec2 coord = planeCoord + cameraPosition.xz * 0.00004;
|
||||
|
||||
float noise = NebulaNoise(coord, wind);
|
||||
noise = max(0.75 - 1.0 / abs(noise - (4.0 + NdotUM * 2.0)), 0.0) * 3.0;
|
||||
|
||||
if (noise > 0.0) {
|
||||
noise *= texture2D(noisetex, abs(coord * 0.25) + wind * 4.0).x;
|
||||
float fireNoise = texture2D(noisetex, abs(coord * 0.2) + wind * 8.0).x;
|
||||
noise *= 0.5 * fireNoise + 0.75;
|
||||
noise = noise * noise * 3.0 / sampleCount;
|
||||
noise *= NdotUM;
|
||||
|
||||
vec3 nebulaColor = nebulaPurple;
|
||||
nebulaColor += nebulaOrange * pow(fireNoise, 5.0);
|
||||
nebulaColor *= gradientMix;
|
||||
|
||||
nebula += noise * nebulaColor * exp2(-6.0 * i / sampleCount);
|
||||
}
|
||||
gradientMix += 1.0 / sampleCount;
|
||||
}
|
||||
|
||||
vec3 starCoord = 0.75 * wpos / (abs(wpos.y) + length(wpos.xz));
|
||||
vec2 starCoord2 = starCoord.xz * 0.5;
|
||||
if (NdotU < 0.0) starCoord2 += 100.0;
|
||||
float starFactor = 1024.0;
|
||||
starCoord2 = floor(starCoord2 * starFactor) / starFactor;
|
||||
float star = 1.0;
|
||||
star *= GetNebulaStarNoise(starCoord2.xy);
|
||||
star *= GetNebulaStarNoise(starCoord2.xy+0.1);
|
||||
star *= GetNebulaStarNoise(starCoord2.xy+0.23);
|
||||
star = max(star - 0.7, 0.0);
|
||||
star *= star;
|
||||
nebulaStars = star * lightCol * 120.0 * (1.0 - NdotUM) * NEBULA_STAR_BRIGHTNESS;
|
||||
|
||||
if (dragonBattle) {
|
||||
nebulaStars *= vec3(2.0, 1.0, 0.5);
|
||||
nebula *= vec3(2.0, 3.0, 2.0) * 0.7;
|
||||
}
|
||||
|
||||
return nebula * 2.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined NETHER && defined NETHER_SMOKE
|
||||
float SmokeNoise(vec2 coord, vec2 wind) {
|
||||
float noise = texture2D(noisetex, coord * 0.175 + wind * 0.25).x;
|
||||
noise+= texture2D(noisetex, coord * 0.04375 + wind * 0.15).x * 5.0;
|
||||
|
||||
return noise;
|
||||
}
|
||||
|
||||
vec3 DrawNetherSmoke(vec3 viewPos, float dither, vec3 lightCol) {
|
||||
float NdotU = dot(normalize(viewPos), upVec);
|
||||
|
||||
#if AA > 1
|
||||
dither = fract(16.0 * frameTimeCounter + dither);
|
||||
#endif
|
||||
|
||||
int sampleCount = 20;
|
||||
|
||||
float gradientMix = dither / sampleCount;
|
||||
|
||||
#if !defined GBUFFERS_WATER && !defined DEFERRED
|
||||
float skytime = frametime;
|
||||
#else
|
||||
float skytime = cloudtime;
|
||||
#endif
|
||||
|
||||
vec2 wind = vec2(skytime * 0.00005);
|
||||
|
||||
vec3 smoke = vec3(0.0);
|
||||
|
||||
float NdotUM = abs(NdotU);
|
||||
NdotUM = 1.0 - NdotUM;
|
||||
|
||||
vec3 wpos = normalize((gbufferModelViewInverse * vec4(viewPos, 1.0)).xyz);
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
vec2 planeCoord = wpos.xz * (1.0 + (i + dither) * 6.0 / sampleCount) * 0.03;
|
||||
vec2 coord = planeCoord + cameraPosition.xz * 0.0017;
|
||||
|
||||
float noise = SmokeNoise(coord, wind);
|
||||
noise = max(0.75 - 1.0 / abs(noise - 6.0), 0.0) * 3.0;
|
||||
|
||||
if (noise > 0.0) {
|
||||
noise *= texture2D(noisetex, abs(coord * 0.25) + wind * 8.0).x;
|
||||
float heightNoise = wpos.y;
|
||||
float fireNoise = texture2D(noisetex, abs(coord * 0.2) + (heightNoise + cameraPosition.y * 0.01) * 0.01 + wind * -4.0).x;
|
||||
noise = noise * noise * 3.0 / sampleCount;
|
||||
noise *= NdotUM;
|
||||
|
||||
vec3 smokeColor = pow(lightCol, vec3(0.6, 0.5, 0.6)) * 12.0 * pow(fireNoise, 5.0);
|
||||
smokeColor *= gradientMix;
|
||||
|
||||
smoke += noise * smokeColor * exp2(-6.0 * i / sampleCount);
|
||||
}
|
||||
gradientMix += 1.0 / sampleCount;
|
||||
}
|
||||
|
||||
return smoke * 2.0;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,28 @@
|
||||
vec3 SunGlare(vec3 color, vec3 nViewPos, vec3 lightCol) {
|
||||
float cosSp = dot(nViewPos, lightVec);
|
||||
if (cosSp > 0.0) {
|
||||
float cosS = cosSp;
|
||||
cosS *= cosS;
|
||||
cosS *= cosS;
|
||||
cosS *= cosS;
|
||||
float visfactor = 0.075;
|
||||
|
||||
float sunGlare = cosS;
|
||||
sunGlare = visfactor / (1.0 - (1.0 - visfactor) * sunGlare) - visfactor;
|
||||
sunGlare *= cosSp;
|
||||
|
||||
sunGlare *= 0.25 * SUN_GLARE_STRENGTH * (1.0 - rainStrengthS);
|
||||
|
||||
float shadowTime = abs(sunVisibility - 0.5) * 2.0;
|
||||
shadowTime *= shadowTime;
|
||||
sunGlare *= shadowTime * shadowTime;
|
||||
|
||||
vec3 finalSunGlare = lightCol * sunGlare;
|
||||
|
||||
if (isEyeInWater == 1) finalSunGlare *= underwaterColor.rgb * underwaterColor.rgb * 200.0;
|
||||
|
||||
color += finalSunGlare;
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
vec4 GetVolumetricClouds(float depth0, float depth1, vec3 vlAlbedo, float dither, vec4 viewPos) {
|
||||
vec4 clouds = vec4(0.0);
|
||||
|
||||
//Color+
|
||||
float sunVisibility2 = sunVisibility * sunVisibility;
|
||||
float sunVisibility4 = sunVisibility2 * sunVisibility2;
|
||||
|
||||
vec3 cloudNightColor = ambientCol * 2.0;
|
||||
vec3 cloudDayColor = pow(lightCol, vec3(1.5)) * (0.5 + 0.5 * timeBrightness);
|
||||
vec3 cloudRainColor = normalize(pow(lightCol, vec3(1.0 + sunVisibility4))) * (0.015 + 0.1 * sunVisibility4 + 0.1 * timeBrightness);
|
||||
|
||||
vec3 cloudUpColor = mix(cloudNightColor, cloudDayColor, sunVisibility4);
|
||||
cloudUpColor = mix(cloudUpColor, cloudRainColor, rainStrengthS);
|
||||
|
||||
vec3 cloudDownColor = cloudUpColor * 0.35;
|
||||
|
||||
float cloudAmountM = 0.075 * CLOUD_AMOUNT * (1.0 - 0.35 * rainStrengthS);
|
||||
|
||||
//Settings
|
||||
float cloudAltitude = 128.0;
|
||||
float cloudThickness = 24.0;
|
||||
int sampleCount = 20;
|
||||
float minDistFactor = 160.0 / sampleCount * sqrt(far / 256.0);
|
||||
|
||||
//Ray Trace
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
float minDist = (i + dither) * minDistFactor;
|
||||
|
||||
if (depth1 < minDist || (depth0 < minDist && vlAlbedo == vec3(0.0))) break;
|
||||
|
||||
float distX = GetDistX(minDist);
|
||||
vec4 viewPos = gbufferProjectionInverse * (vec4(texCoord, distX, 1.0) * 2.0 - 1.0);
|
||||
viewPos /= viewPos.w;
|
||||
vec4 wpos = gbufferModelViewInverse * viewPos;
|
||||
vec3 worldPos = wpos.xyz + cameraPosition.xyz + vec3(cloudtime * 2.0, 0.0, 0.0);
|
||||
|
||||
float yFactor = max(cloudThickness - abs(worldPos.y - cloudAltitude), 0.0) / cloudThickness;
|
||||
float disFalloff = max(32.0 - max(length(wpos.xz) - 256.0, 0.0), 0.0) / 32.0;
|
||||
float smoke = 0.0;
|
||||
if (yFactor * disFalloff > 0.001) {
|
||||
worldPos.xz *= 2.0;
|
||||
smoke = texture2D(noisetex, worldPos.xz * 0.0002 ).r * 0.5;
|
||||
smoke += texture2D(noisetex, worldPos.xz * 0.0001 ).r;
|
||||
smoke += texture2D(noisetex, worldPos.xz * 0.00005 ).r;
|
||||
smoke += texture2D(noisetex, worldPos.xz * 0.000025).r * 2.0;
|
||||
}
|
||||
|
||||
smoke *= disFalloff;
|
||||
smoke *= sqrt1(yFactor) * 0.35;
|
||||
smoke = max(smoke - cloudAmountM, 0.0);
|
||||
|
||||
float blend = ( (worldPos.y - cloudAltitude) / cloudThickness + 1.0 ) * 0.5;
|
||||
blend = clamp(blend, 0.0, 1.0);
|
||||
blend *= blend;
|
||||
vec3 cloudColorSample = mix(cloudDownColor, cloudUpColor, blend);
|
||||
if (depth0 < minDist) cloudColorSample *= vlAlbedo;
|
||||
clouds.rgb = mix(cloudColorSample, clouds.rgb, min(clouds.a, 1.0));
|
||||
|
||||
clouds.a += smoke * 256.0 / sampleCount;
|
||||
}
|
||||
|
||||
clouds *= 0.9;
|
||||
clouds += clouds * dither * 0.19;
|
||||
clouds = sqrt(clouds);
|
||||
|
||||
return clouds;
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
vec4 DistortShadow(vec4 shadowpos, float distortFactor) {
|
||||
shadowpos.xy *= 1.0 / distortFactor;
|
||||
shadowpos.z = shadowpos.z * 0.2;
|
||||
shadowpos = shadowpos * 0.5 + 0.5;
|
||||
|
||||
return shadowpos;
|
||||
}
|
||||
|
||||
void GetShadowSpace(inout vec3 worldposition, inout vec4 vlposition, float shadowdepth, vec2 texCoord) {
|
||||
vec4 viewPos = gbufferProjectionInverse * (vec4(texCoord, shadowdepth, 1.0) * 2.0 - 1.0);
|
||||
viewPos /= viewPos.w;
|
||||
|
||||
vec4 wpos = gbufferModelViewInverse * viewPos;
|
||||
worldposition = wpos.xyz / wpos.w;
|
||||
wpos = shadowModelView * wpos;
|
||||
wpos = shadowProjection * wpos;
|
||||
wpos /= wpos.w;
|
||||
|
||||
float distb = sqrt(wpos.x * wpos.x + wpos.y * wpos.y);
|
||||
float distortFactor = 1.0 - shadowMapBias + distb * shadowMapBias;
|
||||
wpos = DistortShadow(wpos,distortFactor);
|
||||
|
||||
#if defined WATER_CAUSTICS && defined OVERWORLD && defined SMOKEY_WATER_LIGHTSHAFTS
|
||||
if (isEyeInWater == 1.0) {
|
||||
vec3 worldPos = ViewToWorld(viewPos.xyz);
|
||||
vec3 causticpos = worldPos.xyz + cameraPosition.xyz;
|
||||
float caustic = getCausticWaves(causticpos.xyz * 0.25);
|
||||
wpos.xy *= 1.0 + caustic * 0.0125;
|
||||
}
|
||||
#endif
|
||||
|
||||
vlposition = wpos;
|
||||
}
|
||||
|
||||
//Volumetric light from Robobo1221 (highly modified)
|
||||
vec3 GetVolumetricRays(float depth0, float depth1, vec3 vlAlbedo, float dither, float cosS) {
|
||||
vec3 vl = vec3(0.0);
|
||||
|
||||
#if AA > 1
|
||||
float ditherAnimate = 1.61803398875 * mod(float(frameCounter), 3600.0);
|
||||
dither = fract(dither + ditherAnimate);
|
||||
#endif
|
||||
|
||||
#ifdef OVERWORLD
|
||||
float visibility = 0.055;
|
||||
if (isEyeInWater == 1) visibility = 0.19;
|
||||
|
||||
float endurance = 1.20;
|
||||
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
if (isEyeInWater == 0) endurance *= min(2.0 + rainStrengthS*rainStrengthS - sunVisibility * sunVisibility, 2.0);
|
||||
else visibility *= 1.0 + 2.0 * pow(max(cosS, 0.0), 128.0) * float(sunVisibility > 0.5) * (1.0 - rainStrengthS);
|
||||
|
||||
if (endurance >= 1.0) visibility *= max((cosS + endurance) / (endurance + 1.0), 0.0);
|
||||
else visibility *= pow(max((cosS + 1.0) / 2.0, 0.0), (11.0 - endurance*10.0));
|
||||
#else
|
||||
if (isEyeInWater == 0) endurance *= min(1.0 + rainStrengthS*rainStrengthS, 2.0);
|
||||
else visibility *= 1.0 + 2.0 * pow(max(cosS, 0.0), 128.0) * float(sunVisibility > 0.5) * (1.0 - rainStrengthS);
|
||||
|
||||
if (endurance >= 1.0) cosS = max((cosS + endurance) / (endurance + 1.0), 0.0);
|
||||
else cosS = pow(max((cosS + 1.0) / 2.0, 0.0), (11.0 - endurance*10.0));
|
||||
#endif
|
||||
#ifdef CAVE_SKY_FIX
|
||||
visibility *= 1.0 - isEyeInCave;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef END
|
||||
float visibility = 0.14285;
|
||||
#endif
|
||||
|
||||
if (visibility > 0.0) {
|
||||
#ifdef END
|
||||
float maxDist = 192.0 * (1.5 - isEyeInWater);
|
||||
#else
|
||||
float maxDist = 288.0;
|
||||
if (isEyeInWater == 1) maxDist = min(288.0, shadowDistance * 0.75);
|
||||
#endif
|
||||
|
||||
vec3 worldposition = vec3(0.0);
|
||||
vec4 vlposition = vec4(0.0);
|
||||
|
||||
vec3 watercol = underwaterColor.rgb / UNDERWATER_I;
|
||||
watercol = pow(watercol, vec3(2.3)) * 55.0;
|
||||
|
||||
#ifdef END
|
||||
float minDistFactor = 5.0;
|
||||
#else
|
||||
float minDistFactor = 11.0;
|
||||
|
||||
minDistFactor *= clamp(far, 128.0, 512.0) / 192.0;
|
||||
|
||||
float fovFactor = gbufferProjection[1][1] / 1.37;
|
||||
float x = abs(texCoord.x - 0.5);
|
||||
x = 1.0 - x*x;
|
||||
x = pow(x, max(3.0 - fovFactor, 0.0));
|
||||
minDistFactor *= x;
|
||||
maxDist *= x;
|
||||
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
#else
|
||||
float lightBrightnessM = smoothstep(0.0, 1.0, 1.0 - pow2(1.0 - max(timeBrightness, moonBrightness)));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef END
|
||||
int sampleCount = 9;
|
||||
#else
|
||||
float addition = 0.5;
|
||||
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
int sampleCount = 9;
|
||||
if (isEyeInWater == 0) {
|
||||
sampleCount = 7;
|
||||
minDistFactor *= 0.5;
|
||||
}
|
||||
float sampleIntensity = 2.5;
|
||||
#else
|
||||
int sampleCount = 9;
|
||||
float sampleIntensity = 1.95;
|
||||
#endif
|
||||
|
||||
#if LIGHT_SHAFT_QUALITY == 2
|
||||
if (isEyeInWater == 0) {
|
||||
float qualityFactor = 1.42857;
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
sampleCount = 10;
|
||||
#else
|
||||
sampleCount = 13;
|
||||
#endif
|
||||
sampleIntensity /= qualityFactor;
|
||||
minDistFactor /= 1.7; // pow(qualityFactor, 1.5)
|
||||
addition *= qualityFactor;
|
||||
}
|
||||
#endif
|
||||
#if LIGHT_SHAFT_QUALITY == 3
|
||||
if (isEyeInWater == 0) {
|
||||
int qualityFactor = 4;
|
||||
sampleCount *= qualityFactor;
|
||||
sampleIntensity /= qualityFactor;
|
||||
minDistFactor /= 8; // pow(qualityFactor, 1.5)
|
||||
addition *= qualityFactor;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < sampleCount; i++) {
|
||||
#ifdef END
|
||||
float minDist = exp2(i + dither) - 0.9;
|
||||
#else
|
||||
float minDist = 0.0;
|
||||
if (isEyeInWater == 0) {
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
minDist = pow(i + dither + addition, 1.5) * minDistFactor;
|
||||
#else
|
||||
minDist = pow(i + dither + addition, 1.5) * minDistFactor * (0.3 - 0.1 * lightBrightnessM);
|
||||
#endif
|
||||
} else minDist = pow2(i + dither + 0.5) * minDistFactor * 0.045;
|
||||
#endif
|
||||
|
||||
//if (depth0 >= far*0.9999) break;
|
||||
if (minDist >= maxDist) break;
|
||||
|
||||
if (depth1 < minDist || (depth0 < minDist && vlAlbedo == vec3(0.0))) break;
|
||||
|
||||
GetShadowSpace(worldposition, vlposition, GetDistX(minDist), texCoord.st);
|
||||
//vlposition.z += 0.00002;
|
||||
|
||||
if (length(vlposition.xy * 2.0 - 1.0) < 1.0) {
|
||||
vec3 vlsample = vec3(shadow2D(shadowtex0, vlposition.xyz).z);
|
||||
|
||||
if (depth0 < minDist) vlsample *= vlAlbedo;
|
||||
|
||||
#ifdef END
|
||||
if (isEyeInWater == 1) vlsample *= watercol;
|
||||
vl += vlsample;
|
||||
#else
|
||||
if (isEyeInWater == 0) {
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
vl += vlsample * sampleIntensity;
|
||||
#else
|
||||
vlsample *= cosS;
|
||||
|
||||
vl += vlsample * sampleIntensity;
|
||||
#endif
|
||||
} else {
|
||||
vlsample *= watercol;
|
||||
float sampleFactor = sqrt(minDist / maxDist);
|
||||
|
||||
#if LIGHT_SHAFT_MODE == 3
|
||||
vlsample *= cosS;
|
||||
#endif
|
||||
|
||||
vl += vlsample * sampleFactor * 0.55;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
vl += 1.0;
|
||||
}
|
||||
}
|
||||
vl = sqrt(vl * visibility);
|
||||
|
||||
#ifdef END
|
||||
#else
|
||||
#if LIGHT_SHAFT_MODE == 2
|
||||
if (isEyeInWater == 0) {
|
||||
float vlPower = max(1.75 - rainStrengthS + sunVisibility*0.25, 1.0);
|
||||
vl = pow(vl, vec3(vlPower));
|
||||
}
|
||||
#else
|
||||
if (isEyeInWater == 0) {
|
||||
float vlPower = 2.0 - lightBrightnessM;
|
||||
vl = pow(vl, vec3(vlPower));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
vl *= 0.9;
|
||||
vl += vl * dither * 0.19;
|
||||
}
|
||||
|
||||
#ifdef GBUFFER_CODING
|
||||
vl = vec3(0.0);
|
||||
#endif
|
||||
|
||||
return vl;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
//Water fog is now located in multiple programs in different forms. I will put all of them here when I feel like it.
|
||||
//Update: It's been multiple months and I'm still feeling too lazy to do it.
|
||||
@@ -0,0 +1,5 @@
|
||||
vec3 auroraUColSqrt = vec3(AURORA_UP_R, AURORA_UP_G, AURORA_UP_B) * AURORA_UP_I / 255.0;
|
||||
vec3 auroraUCol = auroraUColSqrt * auroraUColSqrt;
|
||||
|
||||
vec3 auroraDColSqrt = vec3(AURORA_DOWN_R, AURORA_DOWN_G, AURORA_DOWN_B) * AURORA_DOWN_I / 255.0;
|
||||
vec3 auroraDCol = auroraDColSqrt * auroraDColSqrt;
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef COLORED_LIGHT
|
||||
vec3 blocklightColSqrt = vec3(BLOCKLIGHT_R, BLOCKLIGHT_G, BLOCKLIGHT_B) * BLOCKLIGHT_I / 255.0;
|
||||
vec3 blocklightCol = blocklightColSqrt * blocklightColSqrt;
|
||||
#else
|
||||
vec3 blocklightColSqrt = vec3(0.387, 0.31, 0.247);
|
||||
vec3 blocklightCol = vec3(0.15, 0.096, 0.061);
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#if defined OVERWORLD || defined SEVEN
|
||||
#include "lightColor.glsl"
|
||||
#endif
|
||||
|
||||
#ifdef NETHER
|
||||
#include "netherColor.glsl"
|
||||
#endif
|
||||
|
||||
#ifdef END
|
||||
#include "endColor.glsl"
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user