################################################################################
#                                                                              #
#    Noble Shaders                                                             #
#    Copyright (C) 2026  Belmu                                                 #
#                                                                              #
#    This program is free software: you can redistribute it and/or modify      #
#    it under the terms of the GNU General Public License as published by      #
#    the Free Software Foundation, either version 3 of the License, or         #
#    (at your option) any later version.                                       #
#                                                                              #
#    This program is distributed in the hope that it will be useful,           #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of            #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #
#    GNU General Public License for more details.                              #
#                                                                              #
#    You should have received a copy of the GNU General Public License         #
#    along with this program.  If not, see <https://www.gnu.org/licenses/>.    #
#                                                                              #
################################################################################

##-----------#  Minecraft Miscellaneous Settings  #-----------##

sun    = false
moon   = false
clouds = off

separateAo        = false
vignette          = false
oldLighting       = false
oldHandLight      = false
underwaterOverlay = false
dynamicHandLight  = true

##--------------------#  Iris-Specific Settings  #---------------------##

#if defined IS_IRIS
    iris.features.required = COMPUTE_SHADERS

    dhShadow.enabled = false
#endif

##--------------# Settings Menu Configuration #---------------##

# Profiles
profile.POTATO = RENDER_MODE=0 RENDER_SCALE_OPTION=75  GI_STRIDE=48 GI=0 ATROUS_FILTER=1                         shadowMapResolution=1024 shadowDistance=64  SHADOWS=3 SHADOW_SAMPLES=4  AO=0 AO_SCALE=50  REFLECTIONS=2 REFLECTIONS_SCALE=75  REFLECTIONS_STRIDE=64 REFRACTIONS=2 ATMOSPHERE_SCALE=10  ATMOSPHERE_SCATTERING_STEPS=8  ATMOSPHERE_TRANSMITTANCE_STEPS=8  CLOUDS_SCALE=50  CLOUDS_LAYER0_ENABLED=0 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=2 AIR_FOG_SCATTERING_STEPS=8  POM_LAYERS=32 POM_DISTANCE=32 POM_SHADOWING=0 POM_DEPTH_WRITE=0 WATER_PARALLAX=0 WATER_CAUSTICS=0 WATER_FOG_STEPS=8
profile.LIGHT  = RENDER_MODE=0 RENDER_SCALE_OPTION=75  GI_STRIDE=32 GI=0 ATROUS_FILTER=1                         shadowMapResolution=2048 shadowDistance=128 SHADOWS=2 SHADOW_SAMPLES=4  AO=2 AO_SCALE=75  REFLECTIONS=1 REFLECTIONS_SCALE=75  REFLECTIONS_STRIDE=48 REFRACTIONS=2 ATMOSPHERE_SCALE=10  ATMOSPHERE_SCATTERING_STEPS=12 ATMOSPHERE_TRANSMITTANCE_STEPS=8  CLOUDS_SCALE=50  CLOUDS_LAYER0_ENABLED=1 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=1 AIR_FOG_SCATTERING_STEPS=8  POM_LAYERS=32 POM_DISTANCE=32 POM_SHADOWING=0 POM_DEPTH_WRITE=0 WATER_PARALLAX=0 WATER_CAUSTICS=0 WATER_FOG_STEPS=8
profile.MEDIUM = RENDER_MODE=0 RENDER_SCALE_OPTION=100 GI_STRIDE=16 GI=0 ATROUS_FILTER=1                         shadowMapResolution=3072 shadowDistance=128 SHADOWS=1 SHADOW_SAMPLES=8  AO=1 AO_SCALE=75  REFLECTIONS=1 REFLECTIONS_SCALE=100 REFLECTIONS_STRIDE=48 REFRACTIONS=1 ATMOSPHERE_SCALE=10  ATMOSPHERE_SCATTERING_STEPS=16 ATMOSPHERE_TRANSMITTANCE_STEPS=8  CLOUDS_SCALE=50  CLOUDS_LAYER0_ENABLED=1 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=1 AIR_FOG_SCATTERING_STEPS=8  POM_LAYERS=32 POM_DISTANCE=32 POM_SHADOWING=0 POM_DEPTH_WRITE=0 WATER_PARALLAX=1 WATER_CAUSTICS=1 WATER_FOG_STEPS=16
profile.HIGH   = RENDER_MODE=0 RENDER_SCALE_OPTION=100 GI_STRIDE=16 GI=0 ATROUS_FILTER=1                         shadowMapResolution=4096 shadowDistance=256 SHADOWS=1 SHADOW_SAMPLES=8  AO=1 AO_SCALE=100 REFLECTIONS=1 REFLECTIONS_SCALE=100 REFLECTIONS_STRIDE=32 REFRACTIONS=1 ATMOSPHERE_SCALE=50  ATMOSPHERE_SCATTERING_STEPS=16 ATMOSPHERE_TRANSMITTANCE_STEPS=16 CLOUDS_SCALE=50  CLOUDS_LAYER0_ENABLED=1 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=1 AIR_FOG_SCATTERING_STEPS=16 POM_LAYERS=64 POM_DISTANCE=64 POM_SHADOWING=1 POM_DEPTH_WRITE=1 WATER_PARALLAX=1 WATER_CAUSTICS=1 WATER_FOG_STEPS=16
profile.ULTRA  = RENDER_MODE=0 RENDER_SCALE_OPTION=100 GI_STRIDE=8  GI=0 ATROUS_FILTER=1                         shadowMapResolution=4096 shadowDistance=512 SHADOWS=1 SHADOW_SAMPLES=16 AO=1 AO_SCALE=100 REFLECTIONS=1 REFLECTIONS_SCALE=100 REFLECTIONS_STRIDE=16 REFRACTIONS=1 ATMOSPHERE_SCALE=100 ATMOSPHERE_SCATTERING_STEPS=24 ATMOSPHERE_TRANSMITTANCE_STEPS=20 CLOUDS_SCALE=75  CLOUDS_LAYER0_ENABLED=1 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=1 AIR_FOG_SCATTERING_STEPS=24 POM_LAYERS=64 POM_DISTANCE=80 POM_SHADOWING=1 POM_DEPTH_WRITE=1 WATER_PARALLAX=1 WATER_CAUSTICS=1 WATER_FOG_STEPS=32
profile.RENDER = RENDER_MODE=1 RENDER_SCALE_OPTION=100 GI_STRIDE=8  GI=1 ATROUS_FILTER=0 TEMPORAL_ACCUMULATION=1 shadowMapResolution=4096 shadowDistance=512 SHADOWS=1 SHADOW_SAMPLES=12 AO=1 AO_SCALE=100 REFLECTIONS=1 REFLECTIONS_SCALE=100 REFLECTIONS_STRIDE=16 REFRACTIONS=1 ATMOSPHERE_SCALE=50  ATMOSPHERE_SCATTERING_STEPS=20 ATMOSPHERE_TRANSMITTANCE_STEPS=16 CLOUDS_SCALE=100 CLOUDS_LAYER0_ENABLED=1 CLOUDS_LAYER1_ENABLED=1 AIR_FOG=1 AIR_FOG_SCATTERING_STEPS=24 POM_LAYERS=64 POM_DISTANCE=32 POM_SHADOWING=1 POM_DEPTH_WRITE=1 WATER_PARALLAX=1 WATER_CAUSTICS=1 WATER_FOG_STEPS=16

# Screens
screen = ABOUT <profile> RENDER_SCALE_OPTION <empty> [LIGHTING] [ATMOSPHERICS] [WORLD] [CAMERA] [DEBUG]

screen.LIGHTING                = [SHADOWS] [AMBIENT_OCCLUSION] [REFLECTIONS_REFRACTIONS] [GLOBAL_ILLUMINATION] <empty> <empty> DIRECTIONAL_LIGHTMAP SUBSURFACE_SCATTERING HARDCODED_EMISSION HARDCODED_SSS <empty> <empty> BLOCKLIGHT_TEMPERATURE EMISSIVE_INTENSITY <empty> <empty> SUNLIGHT_STRENGTH SKYLIGHT_STRENGTH
screen.SHADOWS                 = SHADOWS SHADOW_SAMPLES <empty> shadowMapResolution shadowDistance <empty> CONTACT_SHADOWS CONTACT_SHADOWS_STEPS
screen.AMBIENT_OCCLUSION       = AO AO_STRENGTH AO_FILTER AO_SCALE <empty> <empty> SSAO_SAMPLES SSAO_RADIUS RTAO_SAMPLES RTAO_STRIDE GTAO_SLICES GTAO_RADIUS <empty> <empty> MATERIAL_AO
screen.REFLECTIONS_REFRACTIONS = SPECULAR <empty> REFLECTIONS REFLECTIONS_SCALE REFLECTIONS_STRIDE ROUGH_REFLECTIONS_SAMPLES <empty> REFRACTIONS REFRACTIONS_BORDER_FADE
screen.GLOBAL_ILLUMINATION     = GI [FILTER] <empty> GI_SAMPLES MAX_GI_BOUNCES <empty> SKY_CONTRIBUTION RENDER_ENTITIES
screen.FILTER                  = ATROUS_FILTER TEMPORAL_ACCUMULATION ATROUS_STEP_SIZE <empty> NORMAL_WEIGHT_SIGMA DEPTH_WEIGHT_SIGMA LUMINANCE_WEIGHT_SIGMA
screen.ATMOSPHERICS            = sunPathRotation CELESTIAL_SIZE_MULTIPLIER <empty> [ATMOSPHERE] [CLOUDS] [FOG] [STARS] <empty> WEATHER_TILT
screen.ATMOSPHERE              = ATMOSPHERE_SCALE <empty> ATMOSPHERE_SCATTERING_STEPS ATMOSPHERE_TRANSMITTANCE_STEPS
screen.CLOUDS                  = CLOUDS_SCALE CLOUDS_WIND_SPEED CLOUDS_SHADOWS CLOUDS_SHADOWS_RESOLUTION <empty> <empty> [CLOUDS_LAYER0] [CLOUDS_LAYER1]
screen.CLOUDS_LAYER0           = CLOUDS_LAYER0_ENABLED <empty> CLOUDS_LAYER0_SCATTERING_STEPS CLOUDS_LAYER0_OCTAVES <empty> <empty> CLOUDS_LAYER0_SCALE CLOUDS_LAYER0_DETAILSCALE CLOUDS_LAYER0_FREQUENCY CLOUDS_LAYER0_DENSITY <empty> <empty> CLOUDS_LAYER0_ALTITUDE CLOUDS_LAYER0_THICKNESS CLOUDS_LAYER0_COVERAGE CLOUDS_LAYER0_SWIRL
screen.CLOUDS_LAYER1           = CLOUDS_LAYER1_ENABLED <empty> CLOUDS_LAYER1_SCATTERING_STEPS CLOUDS_LAYER1_OCTAVES <empty> <empty> CLOUDS_LAYER1_SCALE CLOUDS_LAYER1_DETAILSCALE CLOUDS_LAYER1_FREQUENCY CLOUDS_LAYER1_DENSITY <empty> <empty> CLOUDS_LAYER1_ALTITUDE CLOUDS_LAYER1_THICKNESS CLOUDS_LAYER1_COVERAGE CLOUDS_LAYER1_SWIRL
screen.FOG                     = AIR_FOG AIR_FOG_SCATTERING_STEPS <empty> <empty> FOG_SHAPE_SCALE FOG_ALTITUDE FOG_THICKNESS FOG_DENSITY <empty> <empty> AERIAL_PERSPECTIVE AERIAL_PERSPECTIVE_DENSITY <empty> <empty> NETHER_FOG END_FOG
screen.STARS                   = STARS_SCALE STARS_AMOUNT STARS_LUMINANCE
screen.WORLD                   = [WATER] [POM] [RAIN_PUDDLES] [ANIMATIONS]
screen.RAIN_PUDDLES            = RAIN_PUDDLES RAIN_PUDDLES_SIZE
screen.ANIMATIONS              = WAVING_PLANTS WAVING_PLANTS_SPEED <empty> SWINGING_LANTERNS
screen.WATER                   = WATER_OCTAVES <empty> WAVE_SPEED WAVE_STEEPNESS WAVE_AMPLITUDE WAVE_LENGTH <empty> <empty> WATER_CAUSTICS WATER_CAUSTICS_STRENGTH WATER_PARALLAX WATER_PARALLAX_DEPTH <empty> <empty> WATER_FOG WATER_FOG_STEPS [WATER_ABSORPTION] [WATER_SCATTERING]
screen.WATER_ABSORPTION        = WATER_ABSORPTION_R WATER_ABSORPTION_G WATER_ABSORPTION_B
screen.WATER_SCATTERING        = WATER_SCATTERING_R WATER_SCATTERING_G WATER_SCATTERING_B
screen.POM                     = POM POM_DISTANCE <empty> POM_LAYERS POM_DEPTH <empty> POM_SHADOWING POM_DEPTH_WRITE
screen.CAMERA                  = [CAMERA_SETTINGS] [ANTI_ALIASING] [COLOR_GRADING] [POST_PROCESSING]
screen.ANTI_ALIASING           = TAA TAA_STRENGTH
screen.CAMERA_SETTINGS         = EXPOSURE <empty> FOCAL F_STOPS ISO SHUTTER_SPEED
screen.COLOR_GRADING           = TONEMAP LUT PURKINJE WHITE_BALANCE <empty> <empty> VIBRANCE SATURATION CONTRAST GAMMA GAIN LIFT
screen.POST_PROCESSING         = [DEPTH_OF_FIELD] [BLOOM] [LENS_FLARES] [GLARE] [SHARPEN] [VIGNETTE] [FILM_GRAIN] [CEL_SHADING] [MISC]
screen.DEPTH_OF_FIELD          = DOF DOF_SAMPLES <empty> DOF_RADIUS DOF_DEPTH <empty> DOF_ABERRATION DOF_ABERRATION_STRENGTH
screen.BLOOM                   = BLOOM BLOOM_STRENGTH
screen.LENS_FLARES             = LENS_FLARES LENS_FLARES_STRENGTH <empty> <empty> LENS_FLARES_GHOSTS_THIN_FILM LENS_FLARES_GHOSTS_ABERRATION LENS_FLARES_GHOSTS_MIN_SPACING LENS_FLARES_GHOSTS_MAX_SPACING <empty> <empty> LENS_FLARES_HALO LENS_FLARES_HALO_RADIUS LENS_FLARES_HALO_STRETCH_X LENS_FLARES_HALO_STRETCH_Y
screen.GLARE                   = GLARE GLARE_STRENGTH <empty> GLARE_THIN_FILM <empty> GLARE_BLADES GLARE_BLADES_SIZE GLARE_BLADES_ANGLE
screen.SHARPEN                 = SHARPEN SHARPEN_STRENGTH
screen.VIGNETTE                = VIGNETTE VIGNETTE_STRENGTH
screen.FILM_GRAIN              = FILM_GRAIN FILM_GRAIN_STRENGTH
screen.CEL_SHADING             = CEL_SHADING CEL_SHADES
screen.MISC                    = EIGHT_BITS_FILTER <empty> PALETTE
screen.DEBUG                   = DEBUG_ALBEDO DEBUG_NORMALS DEBUG_DEPTH <empty> WHITE_WORLD DEBUG_AO <empty> DEBUG_HISTOGRAM DEBUG_LUT

# Sliders
sliders = RENDER_SCALE_OPTION \
          BLOCKLIGHT_TEMPERATURE EMISSIVE_INTENSITY SUNLIGHT_STRENGTH SKYLIGHT_STRENGTH \
          SHADOW_SAMPLES shadowMapResolution shadowDistance CONTACT_SHADOWS_STEPS \
          AO_STRENGTH AO_SCALE SSAO_SAMPLES SSAO_RADIUS RTAO_SAMPLES RTAO_STRIDE GTAO_SLICES GTAO_RADIUS \
          REFLECTIONS_SCALE REFLECTIONS_STRIDE ROUGH_REFLECTIONS_SAMPLES REFRACTIONS_BORDER_FADE \
          GI_SAMPLES MAX_GI_BOUNCES \
          ATROUS_STEP_SIZE NORMAL_WEIGHT_SIGMA DEPTH_WEIGHT_SIGMA LUMINANCE_WEIGHT_SIGMA \
          sunPathRotation CELESTIAL_SIZE_MULTIPLIER \
          ATMOSPHERE_SCALE ATMOSPHERE_SCATTERING_STEPS ATMOSPHERE_TRANSMITTANCE_STEPS \
          CLOUDS_SCALE CLOUDS_WIND_SPEED CLOUDS_SHADOWS_RESOLUTION \
          CLOUDS_LAYER0_SCATTERING_STEPS CLOUDS_LAYER0_OCTAVES CLOUDS_LAYER0_SCALE CLOUDS_LAYER0_DETAILSCALE CLOUDS_LAYER0_FREQUENCY CLOUDS_LAYER0_DENSITY CLOUDS_LAYER0_ALTITUDE CLOUDS_LAYER0_THICKNESS CLOUDS_LAYER0_COVERAGE CLOUDS_LAYER0_SWIRL \
          CLOUDS_LAYER1_SCATTERING_STEPS CLOUDS_LAYER1_OCTAVES CLOUDS_LAYER1_SCALE CLOUDS_LAYER1_DETAILSCALE CLOUDS_LAYER1_FREQUENCY CLOUDS_LAYER1_DENSITY CLOUDS_LAYER1_ALTITUDE CLOUDS_LAYER1_THICKNESS CLOUDS_LAYER1_COVERAGE CLOUDS_LAYER1_SWIRL \
          AIR_FOG_SCATTERING_STEPS FOG_SHAPE_SCALE FOG_ALTITUDE FOG_THICKNESS FOG_DENSITY AERIAL_PERSPECTIVE_DENSITY \
          STARS_SCALE STARS_AMOUNT STARS_LUMINANCE \
          WATER_OCTAVES WAVE_SPEED WAVE_STEEPNESS WAVE_AMPLITUDE WAVE_LENGTH WATER_CAUSTICS_STRENGTH WATER_PARALLAX_DEPTH WATER_FOG_STEPS WATER_ABSORPTION_R WATER_ABSORPTION_G WATER_ABSORPTION_B WATER_SCATTERING_R WATER_SCATTERING_G WATER_SCATTERING_B \
          POM_LAYERS POM_DEPTH POM_DISTANCE \
          RAIN_PUDDLES_SIZE \
          WAVING_PLANTS_SPEED \
          FOCAL F_STOPS ISO SHUTTER_SPEED \
          DOF_SAMPLES DOF_RADIUS DOF_DEPTH DOF_ABERRATION_STRENGTH \
          LUT WHITE_BALANCE VIBRANCE SATURATION CONTRAST GAMMA GAIN LIFT \
          TAA_STRENGTH \
          BLOOM_STRENGTH SHARPEN_STRENGTH VIGNETTE_STRENGTH FILM_GRAIN_STRENGTH CEL_SHADES PALETTE \
          LENS_FLARES_STRENGTH LENS_FLARES_GHOSTS_MIN_SPACING LENS_FLARES_GHOSTS_MAX_SPACING LENS_FLARES_HALO_RADIUS LENS_FLARES_HALO_STRETCH_X LENS_FLARES_HALO_STRETCH_Y \
          GLARE_STRENGTH GLARE_BLADES GLARE_BLADES_SIZE GLARE_BLADES_ANGLE

# Columns
screen.columns                         = 1
screen.SHADOWS.columns                 = 1
screen.REFLECTIONS_REFRACTIONS.columns = 1
screen.GLOBAL_ILLUMINATION.columns     = 1
screen.FILTER.columns                  = 1
screen.ATMOSPHERICS.columns            = 1
screen.ATMOSPHERE.columns              = 1
screen.STARS.columns                   = 1
screen.WORLD.columns                   = 1
screen.RAIN_PUDDLES.columns            = 1
screen.ANIMATIONS.columns              = 1
screen.WATER_ABSORPTION.columns        = 3
screen.WATER_SCATTERING.columns        = 3
screen.POM.columns                     = 1
screen.CAMERA.columns                  = 1
screen.CAMERA_SETTINGS.columns         = 1
screen.ANTI_ALIASING.columns           = 1
screen.POST_PROCESSING.columns         = 1
screen.DEPTH_OF_FIELD.columns          = 1
screen.BLOOM.columns                   = 1
screen.GLARE.columns                   = 1
screen.SHARPEN.columns                 = 1
screen.VIGNETTE.columns                = 1
screen.FILM_GRAIN.columns              = 1
screen.CEL_SHADING.columns             = 1
screen.MISC.columns                    = 1
screen.DEBUG.columns                   = 1

##-------------------#  Custom Uniforms  #--------------------##

uniform.float.rcp240 = 1.0 / 240.0

uniform.int.framemod   = frameCounter % 8
uniform.vec2.viewSize  = vec2(viewWidth, viewHeight)
uniform.vec2.texelSize = vec2(1.0 / viewWidth, 1.0 / viewHeight)

uniform.vec3.shadowLightVector = vec3(shadowLightPosition.x * 0.01, shadowLightPosition.y * 0.01, shadowLightPosition.z * 0.01)

# World space celestial vectors uniforms from Zombye (Spectrum - https://github.com/zombye/spectrum)

variable.float.sunVectorNorm = 1.0 / sqrt((sunPosition.x * sunPosition.x) + (sunPosition.y * sunPosition.y) + (sunPosition.z * sunPosition.z))
uniform.vec3.sunVectorView   = vec3(sunPosition.x * sunVectorNorm, sunPosition.y * sunVectorNorm, sunPosition.z * sunVectorNorm)
variable.float.sunVectorX    = gbufferModelViewInverse.0.0 * sunPosition.x + gbufferModelViewInverse.1.0 * sunPosition.y + gbufferModelViewInverse.2.0 * sunPosition.z
variable.float.sunVectorY    = gbufferModelViewInverse.0.1 * sunPosition.x + gbufferModelViewInverse.1.1 * sunPosition.y + gbufferModelViewInverse.2.1 * sunPosition.z
variable.float.sunVectorZ    = gbufferModelViewInverse.0.2 * sunPosition.x + gbufferModelViewInverse.1.2 * sunPosition.y + gbufferModelViewInverse.2.2 * sunPosition.z
uniform.vec3.sunVector       = vec3(sunVectorX * sunVectorNorm, sunVectorY * sunVectorNorm, sunVectorZ * sunVectorNorm)

variable.float.moonVectorNorm = 1.0 / sqrt((moonPosition.x * moonPosition.x) + (moonPosition.y * moonPosition.y) + (moonPosition.z * moonPosition.z))
uniform.vec3.moonVectorView   = vec3(moonPosition.x * moonVectorNorm, moonPosition.y * moonVectorNorm, moonPosition.z * moonVectorNorm)
variable.float.moonVectorX    = gbufferModelViewInverse.0.0 * moonPosition.x + gbufferModelViewInverse.1.0 * moonPosition.y + gbufferModelViewInverse.2.0 * moonPosition.z
variable.float.moonVectorY    = gbufferModelViewInverse.0.1 * moonPosition.x + gbufferModelViewInverse.1.1 * moonPosition.y + gbufferModelViewInverse.2.1 * moonPosition.z
variable.float.moonVectorZ    = gbufferModelViewInverse.0.2 * moonPosition.x + gbufferModelViewInverse.1.2 * moonPosition.y + gbufferModelViewInverse.2.2 * moonPosition.z
uniform.vec3.moonVector       = vec3(moonVectorX * moonVectorNorm, moonVectorY * moonVectorNorm, moonVectorZ * moonVectorNorm)

variable.float.shadowLightVectorWorldNorm = 1.0 / sqrt((shadowLightPosition.x * shadowLightPosition.x) + (shadowLightPosition.y * shadowLightPosition.y) + (shadowLightPosition.z * shadowLightPosition.z))
uniform.vec3.shadowLightVectorWorldView   = vec3(shadowLightPosition.x * shadowLightVectorWorldNorm, shadowLightPosition.y * shadowLightVectorWorldNorm, shadowLightPosition.z * shadowLightVectorWorldNorm)
variable.float.shadowLightVectorWorldX    = gbufferModelViewInverse.0.0 * shadowLightPosition.x + gbufferModelViewInverse.1.0 * shadowLightPosition.y + gbufferModelViewInverse.2.0 * shadowLightPosition.z
variable.float.shadowLightVectorWorldY    = gbufferModelViewInverse.0.1 * shadowLightPosition.x + gbufferModelViewInverse.1.1 * shadowLightPosition.y + gbufferModelViewInverse.2.1 * shadowLightPosition.z
variable.float.shadowLightVectorWorldZ    = gbufferModelViewInverse.0.2 * shadowLightPosition.x + gbufferModelViewInverse.1.2 * shadowLightPosition.y + gbufferModelViewInverse.2.2 * shadowLightPosition.z
uniform.vec3.shadowLightVectorWorld       = vec3(shadowLightVectorWorldX * shadowLightVectorWorldNorm, shadowLightVectorWorldY * shadowLightVectorWorldNorm, shadowLightVectorWorldZ * shadowLightVectorWorldNorm)

#ifndef PPT_NONE
    #define PPT_NONE 0
#endif

#ifndef PPT_RAIN
    #define PPT_RAIN 1
#endif

#ifndef PPT_SNOW
    #define PPT_SNOW 2
#endif

# Biome uniforms from sixthsurge (Photon - https://github.com/sixthsurge/photon)

uniform.float.biome_arid = smooth(if(biome_category == CAT_DESERT || biome_category == CAT_MESA || biome_category == CAT_SAVANNA, 1.0, 0.0), 30, 30)

uniform.float.biome_may_rain      = smooth(if(biome_precipitation == PPT_RAIN, 1.0, 0.0), 30, 30)
uniform.float.biome_may_sandstorm = smooth(if(biome_category == CAT_DESERT || biome_category == CAT_MESA, 1.0, 0.0), 30, 30)

##-------------------#  Custom Textures  #--------------------##

#if LUT == 1
    texture.composite.colortex6 = image/grading/lut0.png
#elif LUT == 2
    texture.composite.colortex6 = image/grading/lut1.png
#elif LUT == 3
    texture.composite.colortex6 = image/grading/lut2.png
#elif LUT == 4
    texture.composite.colortex6 = image/grading/lut3.png
#elif LUT == 5
    texture.composite.colortex6 = image/grading/lut4.png
#elif LUT == 6
    texture.composite.colortex6 = image/grading/lut5.png
#elif LUT == 7
    texture.composite.colortex6 = image/grading/lut6.png
#elif LUT == 8
    texture.composite.colortex6 = image/grading/lut7.png
#elif LUT == 9
    texture.composite.colortex6 = image/grading/lut8.png
#elif LUT == 10
    texture.composite.colortex6 = image/grading/lut9.png
#elif LUT == 11
    texture.composite.colortex6 = image/grading/lut10.png
#elif LUT == 12
    texture.composite.colortex6 = image/grading/lut11.png
#elif LUT == 13
    texture.composite.colortex6 = image/grading/lut12.png
#elif LUT == 14
    texture.composite.colortex6 = image/grading/lut13.png
#elif LUT == 15
    texture.composite.colortex6 = image/grading/lut14.png
#elif LUT == 16
    texture.composite.colortex6 = image/grading/lut15.png
#elif LUT == 17
    texture.composite.colortex6 = image/grading/lut16.png
#elif LUT == 18
    texture.composite.colortex6 = image/grading/lut17.png
#elif LUT == 19
    texture.composite.colortex6 = image/grading/lut18.png
#elif LUT == 20
    texture.composite.colortex6 = image/grading/lut19.png
#endif

texture.noise = image/noise.png

# Clouds noise textures

#if CLOUDS_LAYER0_ENABLED == 1 || CLOUDS_LAYER1_ENABLED == 1
    texture.deferred.depthtex2      = image/clouds/shapeNoise.dat TEXTURE_3D RGBA8 128 128 128 RGBA UNSIGNED_BYTE
    texture.deferred.shadowcolor1.1 = image/clouds/curl.dat TEXTURE_3D RGB8 32 32 32 RGB UNSIGNED_BYTE
#endif

# Fog noise texture

#if AIR_FOG == 1
    texture.composite.depthtex2 = image/clouds/shapeNoise.dat TEXTURE_3D RGBA8 128 128 128 RGBA UNSIGNED_BYTE
#endif

##--------------------#  Alpha Testing  #---------------------##

alphaTest.gbuffers_armor_glint  = off
alphaTest.gbuffers_basic        = off
alphaTest.gbuffers_block        = off
alphaTest.gbuffers_damagedblock = off
alphaTest.gbuffers_entities     = off
alphaTest.gbuffers_hand         = off
alphaTest.gbuffers_hand_water   = off
alphaTest.gbuffers_skybasic     = off
alphaTest.gbuffers_terrain      = off
alphaTest.gbuffers_textured     = off
alphaTest.gbuffers_textured_lit = off
alphaTest.gbuffers_water        = off
alphaTest.gbuffers_weather      = off
alphaTest.shadow                = off

##--------------------#  Alpha Blending  #--------------------##

blend.gbuffers_armor_glint  = off
blend.gbuffers_block        = off
blend.gbuffers_damagedblock = off
blend.gbuffers_entities     = off
blend.gbuffers_hand         = off
blend.gbuffers_terrain      = off
blend.shadow                = off

# Bloom tiles
blend.composite16 = ONE SRC_ALPHA ONE ONE
blend.composite17 = ONE SRC_ALPHA ONE ONE
blend.composite18 = ONE SRC_ALPHA ONE ONE
blend.composite19 = ONE SRC_ALPHA ONE ONE
blend.composite20 = ONE SRC_ALPHA ONE ONE
blend.composite21 = ONE SRC_ALPHA ONE ONE
blend.composite22 = ONE SRC_ALPHA ONE ONE
blend.composite23 = ONE SRC_ALPHA ONE ONE

# Translucents
blend.gbuffers_weather                = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_water.colortex0        = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_hand_water.colortex0   = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_textured.colortex0     = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
blend.gbuffers_textured_lit.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE

#if MC_VERSION <= 12111
    program.world0/gbuffers_entities_translucent.enabled  = false
    program.world1/gbuffers_entities_translucent.enabled  = false
    program.world-1/gbuffers_entities_translucent.enabled = false

    blend.gbuffers_entities_translucent.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
#endif

# DH

#if defined IS_IRIS
    blend.dh_terrain         = off
    blend.dh_water.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
#endif

##-------------------#  Custom Buffers Sizes  #--------------------##

######################################
##                AO                ##
######################################

#if AO_SCALE == 25 && GI == 0 && AO > 0
    size.buffer.colortex12 = 0.25 0.25
#elif AO_SCALE == 50 && GI == 0 && AO > 0
    size.buffer.colortex12 = 0.50 0.50
#elif AO_SCALE == 75 && GI == 0 && AO > 0
    size.buffer.colortex12 = 0.75 0.75
#endif

######################################
##            ATMOSPHERE            ##
######################################

#if ATMOSPHERE_SCALE == 10
    size.buffer.colortex6 = 0.10 0.10
#elif ATMOSPHERE_SCALE == 15
    size.buffer.colortex6 = 0.15 0.15
#elif ATMOSPHERE_SCALE == 20
    size.buffer.colortex6 = 0.20 0.20
#elif ATMOSPHERE_SCALE == 25
    size.buffer.colortex6 = 0.25 0.25
#elif ATMOSPHERE_SCALE == 30
    size.buffer.colortex6 = 0.30 0.30
#elif ATMOSPHERE_SCALE == 35
    size.buffer.colortex6 = 0.35 0.35
#elif ATMOSPHERE_SCALE == 40
    size.buffer.colortex6 = 0.40 0.40
#elif ATMOSPHERE_SCALE == 45
    size.buffer.colortex6 = 0.45 0.45
#elif ATMOSPHERE_SCALE == 50
    size.buffer.colortex6 = 0.50 0.50
#elif ATMOSPHERE_SCALE == 55
    size.buffer.colortex6 = 0.55 0.55
#elif ATMOSPHERE_SCALE == 60
    size.buffer.colortex6 = 0.60 0.60
#elif ATMOSPHERE_SCALE == 65
    size.buffer.colortex6 = 0.65 0.65
#elif ATMOSPHERE_SCALE == 70
    size.buffer.colortex6 = 0.70 0.70
#elif ATMOSPHERE_SCALE == 75
    size.buffer.colortex6 = 0.75 0.75
#elif ATMOSPHERE_SCALE == 80
    size.buffer.colortex6 = 0.80 0.80
#elif ATMOSPHERE_SCALE == 85
    size.buffer.colortex6 = 0.85 0.85
#elif ATMOSPHERE_SCALE == 90
    size.buffer.colortex6 = 0.90 0.90
#elif ATMOSPHERE_SCALE == 95
    size.buffer.colortex6 = 0.95 0.95
#endif

######################################
##              CLOUDS              ##
######################################

#if CLOUDS_SCALE == 25
    size.buffer.colortex7  = 0.25 0.25
    size.buffer.colortex14 = 0.25 0.25
#elif CLOUDS_SCALE == 30
    size.buffer.colortex7  = 0.30 0.30
    size.buffer.colortex14 = 0.30 0.30
#elif CLOUDS_SCALE == 40
    size.buffer.colortex7  = 0.40 0.40
    size.buffer.colortex14 = 0.40 0.40
#elif CLOUDS_SCALE == 50
    size.buffer.colortex7  = 0.50 0.50
    size.buffer.colortex14 = 0.50 0.50
#elif CLOUDS_SCALE == 60
    size.buffer.colortex7  = 0.60 0.60
    size.buffer.colortex14 = 0.60 0.60
#elif CLOUDS_SCALE == 70
    size.buffer.colortex7  = 0.70 0.70
    size.buffer.colortex14 = 0.70 0.70
#elif CLOUDS_SCALE == 75
    size.buffer.colortex7  = 0.75 0.75
    size.buffer.colortex14 = 0.75 0.75
#elif CLOUDS_SCALE == 80
    size.buffer.colortex7  = 0.80 0.80
    size.buffer.colortex14 = 0.80 0.80
#elif CLOUDS_SCALE == 90
    size.buffer.colortex7  = 0.90 0.90
    size.buffer.colortex14 = 0.90 0.90
#endif

######################################
##           REFLECTIONS            ##
######################################

#if REFLECTIONS_SCALE == 25
    size.buffer.colortex2 = 0.25 0.25
#elif REFLECTIONS_SCALE == 50
    size.buffer.colortex2 = 0.50 0.50
#elif REFLECTIONS_SCALE == 75
    size.buffer.colortex2 = 0.75 0.75
#endif
