clouds = off
oldLighting = false
underwaterOverlay = false
vignette = false
sun = false

texture.noise = textures/noise.png
texture.gbuffers.gaux1 = minecraft:textures/atlas/blocks.png
texture.gbuffers.gaux2 = textures/rain_ripple.png
texture.deferred.colortex4 = minecraft:dynamic/lightmap_1
texture.composite.colortex5 = minecraft:dynamic/lightmap_1
#ifndef IS_IRIS
texture.deferred.colortex7 = textures/AtmosphereTransmittance.bin TEXTURE_2D RGB16 256 256 RGB UNSIGNED_SHORT
texture.composite.colortex7 = textures/AtmosphereTransmittance.bin TEXTURE_2D RGB16 256 256 RGB UNSIGNED_SHORT
#else
customTexture.transmittanceTex = textures/AtmosphereTransmittance.bin TEXTURE_2D RGB16 256 256 RGB UNSIGNED_SHORT
#endif

flip.deferred11.colortex0 = true
flip.deferred11.colortex6 = false
flip.composite_pre.colortex5 = true
flip.composite_pre.colortex7 = true
flip.composite3.colortex0 = true
flip.composite5.colortex5 = true
flip.composite5.colortex6 = true
flip.composite5.colortex7 = true
flip.composite7.colortex6 = true
flip.composite9.colortex7 = true
flip.composite14.colortex3 = true
flip.composite14.colortex5 = true
flip.composite14.colortex6 = true

blend.gbuffers_basic = ONE ZERO ONE ZERO
blend.gbuffers_block = ONE ZERO ONE ZERO
blend.gbuffers_hand = ONE ZERO ONE ZERO
blend.gbuffers_hand_water = ONE ZERO ONE ZERO
blend.gbuffers_entities = ONE ZERO ONE ZERO
blend.gbuffers_entities_glowing = ONE ZERO ONE ZERO
blend.gbuffers_spidereyes = ONE ZERO ONE ZERO
blend.gbuffers_terrain = ONE ZERO ONE ZERO
blend.gbuffers_textured = ONE ZERO ONE ZERO
blend.gbuffers_water = ONE ZERO ONE ZERO
blend.dh_terrain = ONE ZERO ONE ZERO
blend.dh_water = ONE ZERO ONE ZERO

blend.gbuffers_damagedblock = DST_COLOR SRC_COLOR ZERO ONE

blend.gbuffers_block.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_hand.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_entities.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_entities_glowing.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_spidereyes.colortex0 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO

blend.gbuffers_weather = ZERO ONE ONE ZERO

program.composite1.enabled = REFLECTION
program.composite2.enabled = REFLECTION
program.composite4.enabled = !UNDERGROUND_MODE
program.composite8.enabled = DEPTH_OF_FIELD
program.world-1/composite1.enabled = REFLECTION
program.world-1/composite2.enabled = REFLECTION
program.world-1/composite8.enabled = DEPTH_OF_FIELD
program.world1/composite1.enabled = REFLECTION
program.world1/composite2.enabled = REFLECTION
program.world1/composite8.enabled = DEPTH_OF_FIELD

#ifndef VOXY
program.deferred99.enabled = false
program.world-1/deferred99.enabled = false
program.world1/deferred99.enabled = false
#endif

screen = ANISOTROPIC_FILTERING_QUALITY ENTITY_TEXTURE_RESOLUTION shadowMapResolution shadowDistance <empty> <empty> \
         [Texture] [Reflection] [Shadow] [Lighting] [Cloud] [Atmosphere] [PostProcessing] [Weather] <empty> <empty> [ModSupport] [Experimental]
screen.columns = 2
    screen.Texture = ANISOTROPIC_FILTERING_QUALITY REFRACTION_STRENGTH REFRACTION_EDGE_FADE <empty> [PlantWave] [Water] [Normal] [Parallax] [Specular]
    screen.Texture.columns = 1
        screen.PlantWave = <empty> <empty> PLANT_WAVE <empty> PLANT_WAVE_STRENGTH PLANT_WAVE_SPEED PLANT_WAVE_RAIN_EXTRA_STRENGTH
        screen.PlantWave.columns = 1
        screen.Water = <empty> WATER_TYPE <empty> CAULDRON_WAVE <empty> WATER_WAVE_SCALE WATER_WAVE_HEIGHT WATER_WAVE_SPEED
        screen.Water.columns = 1
        screen.Normal = <empty> <empty> NORMAL_STRENGTH <empty> NORMAL_FORMAT PARALLAX_BASED_NORMAL SMOOTH_NORMAL
        screen.Normal.columns = 1
        screen.Parallax = PARALLAX SMOOTH_PARALLAX VOXEL_PARALLAX ENTITY_PARALLAX <empty> ENTITY_TEXTURE_RESOLUTION PARALLAX_DEPTH PARALLAX_QUALITY PARALLAX_MAX_REFINEMENTS
        screen.Parallax.columns = 1
        screen.Specular = SUBSERFACE_SCATTERING_STRENTGH PBR_BRIGHTNESS SPECULAR_FORMAT SPECULAR_EMISSIVE HARDCODED_EMISSIVE LABPBR_F0 \
                          HARDCODED_METAL LABPBR_POROSITY LABPBR_TEXTURE_AO
        screen.Specular.columns = 1
    screen.Reflection = <empty> SCREEN_SPACE_REFLECTION_STEP SCREEN_SPACE_REFLECTION_REFINEMENTS <empty> REFLECTION FULL_REFLECTION REFLECTION_FILTER CLOUD_IN_REFLECTION
    screen.Reflection.columns = 1
    screen.Shadow = shadowMapResolution shadowDistance SHADOW_DISTORTION_STRENGTH sunPathRotation PCSS_SAMPLES SUBSERFACE_SCATTERING_STRENTGH SCREEN_SPACE_SHADOW_SAMPLES \
                    <empty> <empty> <empty> PCSS SCREEN_SPACE_SHADOW TRANSPARENT_SHADOW WATER_CAUSTIC CLOUD_SHADOW LIGHT_LEAKING_FIX UNDERGROUND_MODE
    screen.Shadow.columns = 2
    screen.Lighting = <empty> <empty> MOD_LIGHT_DETECTION [VisibilityBitmask] <empty> <empty> VANILLA_BLOCK_LIGHT_FADE SUNLIGHT_BRIGHTNESS NIGHT_BRIGHTNESS NIGHT_VISION_BRIGHTNESS \
                      <empty> <empty> LIGHT_BRIGHTNESS LIGHT_COLOR_R LIGHT_COLOR_G LIGHT_COLOR_B
    screen.Lighting.columns = 2
        screen.VisibilityBitmask = VBGI <empty> VB_TRACE_COUNT <empty> VB_STEPS VB_GI_LENGTH VB_AO_LENGTH <empty> VB_MAX_BLEDED_FRAMES
        screen.VisibilityBitmask.columns = 1
    screen.Cloud = CLOUD_TYPE CLOUD_SCALE CLOUD_SPEED <empty> [BlockyCloud] [PlaneCloud] [RealisticCloudQuality] [RealisticCloudShape] [RealisticCloudLighting]
    screen.Cloud.columns = 1
        screen.BlockyCloud = <empty> CLOUD_BLOCKY_MAX_SAMPLES CLOUD_BLOCKY_LIGHT_SAMPLES <empty> CLOUD_BLOCKY_AMOUNT CLOUD_BLOCKY_HEIGHT CLOUD_BLOCKY_THICKNESS \
                             CLOUD_BLOCKY_FADE_DISTANCE CLOUD_BLOCKY_FADE_SPEED
        screen.BlockyCloud.columns = 1
        screen.PlaneCloud = <empty> <empty> PLANE_CLOUD PLANE_CLOUD_SPEED <empty> <empty> PLANE_CLOUD_SCALE PLANE_CLOUD_DENSITY PLANE_CLOUD_AMOUNT PLANE_CLOUD_OCTAVES \
                            PLANE_CLOUD_HEIGHT PLANE_CLOUD_FADE_DISTANCE PLANE_CLOUD_OCTAVE_SCALE PLANE_CLOUD_OCTAVE_FADE
        screen.PlaneCloud.columns = 2
        screen.RealisticCloudQuality = <empty> <empty> CLOUD_REALISTIC_HQ_SAMPLES CLOUD_REALISTIC_SHADOWLIGHT_SAMPLES \
                                       <empty> CLOUD_REALISTIC_OCTAVES CLOUD_REALISTIC_SHADOWLIGHT_OCTAVES
        screen.RealisticCloudQuality.columns = 1
        screen.RealisticCloudShape = CLOUD_REALISTIC_OCTAVES CLOUD_REALISTIC_DENSITY CLOUD_REALISTIC_OCTAVE_SCALE CLOUD_REALISTIC_OCTAVE_FADE <empty> <empty> \
                                     CLOUD_REALISTIC_AMOUNT CLOUD_REALISTIC_RAIN_INCREAMENT <empty> <empty> CLOUD_REALISTIC_OFFSET_X CLOUD_REALISTIC_OFFSET_Z <empty> <empty> \
                                     CLOUD_REALISTIC_HEIGHT CLOUD_REALISTIC_THICKNESS CLOUD_REALISTIC_CENTER CLOUD_REALISTIC_HARDNESS
        screen.RealisticCloudShape.columns = 2
        screen.RealisticCloudLighting = <empty> CLOUD_REALISTIC_BASIC_SHADOWLIGHT CLOUD_REALISTIC_BASIC_SKYLIGHT <empty> \
                                        CLOUD_REALISTIC_SHADOWLIGHT_STEPSCALE <empty> CLOUD_REALISTIC_FADE_DISTANCE
        screen.RealisticCloudLighting.columns = 1
    screen.Atmosphere = <empty> <empty> ATMOSPHERE_VIEW_SAMPLE WORLD_BASIC_HEIGHT <empty> <empty> ATMOSPHERE_SCATTERING_FOG [CommonFog] [RainFog] <empty> <empty> <empty> \
                        VOLUMETRIC_LIGHT VOLUMETRIC_FOG [VolumetricLight] [VolumetricFog]
    screen.Atmosphere.columns = 2
        screen.RainFog = <empty> <empty> RF_DENSITY RF_GROUND_EXTRA_DENSITY <empty> <empty> RAIN_BLOOM_FOG_DENSITY
        screen.RainFog.columns = 1
        screen.VolumetricLight = <empty> VL_STRENGTH <empty> VL_SAMPLES <empty> MORNING_VL_STRENGTH <empty> NOON_VL_STRENGTH
        screen.VolumetricLight.columns = 1
        screen.VolumetricFog = VOLUMETRIC_FOG_AMOUNT VOLUMETRIC_FOG_DENSITY VOLUMETRIC_FOG_CENTER_HEIGHT VOLUMETRIC_FOG_THICKNESS \
                               <empty> <empty> VOLUMETRIC_FOG_MORNING_DENSITY VOLUMETRIC_FOG_NOON_DENSITY \
                               <empty> <empty> VOLUMETRIC_FOG_SPEED <empty> \
                               <empty> <empty> VOLUMETRIC_FOG_SCALE VOLUMETRIC_FOG_OCTAVES VOLUMETRIC_FOG_OCTAVE_SCALE VOLUMETRIC_FOG_OCTAVE_FADE
        screen.VolumetricFog.columns = 2
        screen.CommonFog = WATER_ABSORPTION_R WATER_ABSORPTION_G WATER_ABSORPTION_B SNOW_FOG_DENSITY <empty> <empty> LAVA_FOG_DENSITY LAVA_FOG_BRIGHTNESS <empty> <empty> \
                           NETHER_FOG_DENSITY NETHER_FOG_BRIGHTNESS <empty> <empty> END_FOG_DENSITY END_FOG_BRIGHTNESS END_GALAXY_AMOUNT END_GALAXY_BRIGHTNESS
        screen.CommonFog.columns = 2
    screen.PostProcessing = <empty> <empty> [MotionBlur] [ToneMapping] [Exposure] [DepthOfField] [ChromaticDispersion] [Sharpening] \
                            <empty> <empty> <empty> <empty> TAA DISTORTION_STRENGTH BLOOM_INTENSITY VIGNETTE_STRENGTH
    screen.PostProcessing.columns = 2
        screen.MotionBlur = <empty> <empty> MOTION_BLUR <empty> MOTION_BLUR_STRENGTH MOTION_BLUR_QUALITY
        screen.MotionBlur.columns = 1
        screen.ToneMapping = <empty> TONEMAPPING GAMMA SATURATION COLOR_TEMPERATURE <empty> [Uchimura] [AgX]
        screen.ToneMapping.columns = 1
            screen.Uchimura = <empty> <empty> MINIMUM_BRIGHTNESS <empty> BLACK_TIGHTNESS <empty> CONTRAST
            screen.Uchimura.columns = 1
            screen.AgX = <empty> <empty> AGX_LOOK <empty> AGX_EV_MIN <empty> AGX_EV_MAX
            screen.AgX.columns = 1
        screen.Exposure = <empty> EXPOSURE_VALUE <empty> AVERAGE_EXPOSURE_CENTER_WEIGHT <empty> AVERAGE_EXPOSURE_STRENGTH <empty> AVERAGE_EXPOSURE_TENDENCY
        screen.Exposure.columns = 1
        screen.DepthOfField = DEPTH_OF_FIELD FOCUS_MODE HAND_DOF CORRECT_DOF_HAND_DEPTH DOF_DEPTH_TEXTURE DOF_FOCUS_TEXTURE PARALLAX_DOF <empty> \
                              COC_SPREAD_SAMPLES DOF_SAMPLES APERTURE_DIAMETER_SCALE MAX_BLUR_RADIUS FOCAL_LENGTH centerDepthHalflife MANUAL_FOCUS_DEPTH \
                              LENS_DIAMETER_SCALE APERTURE_CORROSION_OFFSET APERTURE_CORROSION
        screen.DepthOfField.columns = 2
        screen.ChromaticDispersion = <empty> <empty> CHROMATIC_DISPERSION_R <empty> CHROMATIC_DISPERSION_G <empty> CHROMATIC_DISPERSION_B
        screen.ChromaticDispersion.columns = 1
        screen.Sharpening = <empty> <empty> FINAL_SHARPENING SHARPENING_DENOISE <empty> SHARPENING_SRENGTH SHARPENING_LIMIT
        screen.Sharpening.columns = 1
    screen.Weather = RAIN_PUDDLE RAIN_RIPPLES RIPPLE_SPEED RIPPLE_SCALE RIPPLE_STRENGTH RIPPLE_FADE_SPEED <empty> RAIN_DROP_SIZE RAIN_DROP_AMOUNT
    screen.Weather.columns = 1
    screen.ModSupport = MOD_WATER_DETECTION <empty> MOD_LIGHT_DETECTION <empty> MOD_PLANT_DETECTION <empty> MOD_NIGHT_VISION_COMPAT <empty> TEMPORAL_IGNORE_HAND_ANIMATION
    screen.ModSupport.columns = 1
    screen.Experimental = <empty> AUTHOR <empty> GLOWING_OVERLAY <empty> LIGHT_LEAKING_FIX UNDERGROUND_MODE SHADOW_DISTORTION_FIX
    screen.Experimental.columns = 1

sliders =   ENTITY_TEXTURE_RESOLUTION ANISOTROPIC_FILTERING_QUALITY REFRACTION_STRENGTH REFRACTION_EDGE_FADE \
            PLANT_WAVE_STRENGTH PLANT_WAVE_SPEED PLANT_WAVE_RAIN_EXTRA_STRENGTH \
            WATER_WAVE_SCALE WATER_WAVE_HEIGHT WATER_WAVE_SPEED \
            NORMAL_STRENGTH PARALLAX_DEPTH PARALLAX_QUALITY PARALLAX_MAX_REFINEMENTS \
            SUBSERFACE_SCATTERING_STRENTGH PBR_BRIGHTNESS SCREEN_SPACE_SHADOW_SAMPLES \
            shadowMapResolution shadowDistance SHADOW_DISTORTION_STRENGTH sunPathRotation PCSS_SAMPLES \
            REFLECTION_FILTER SCREEN_SPACE_REFLECTION_STEP SCREEN_SPACE_REFLECTION_REFINEMENTS \
            ATMOSPHERE_VIEW_SAMPLE WORLD_BASIC_HEIGHT \
            RF_DENSITY RF_GROUND_EXTRA_DENSITY RAIN_BLOOM_FOG_DENSITY \
            VL_STRENGTH VL_SAMPLES MORNING_VL_STRENGTH NOON_VL_STRENGTH \
            VOLUMETRIC_FOG_AMOUNT VOLUMETRIC_FOG_CENTER_HEIGHT VOLUMETRIC_FOG_THICKNESS VOLUMETRIC_FOG_DENSITY VOLUMETRIC_FOG_MORNING_DENSITY VOLUMETRIC_FOG_NOON_DENSITY \
            VOLUMETRIC_FOG_SPEED VOLUMETRIC_FOG_SCALE VOLUMETRIC_FOG_OCTAVES VOLUMETRIC_FOG_OCTAVE_SCALE VOLUMETRIC_FOG_OCTAVE_FADE \
            CLOUD_SCALE CLOUD_SPEED \
            CLOUD_BLOCKY_MAX_SAMPLES CLOUD_BLOCKY_LIGHT_SAMPLES CLOUD_BLOCKY_AMOUNT CLOUD_BLOCKY_HEIGHT CLOUD_BLOCKY_THICKNESS \
            CLOUD_BLOCKY_FADE_DISTANCE CLOUD_BLOCKY_FADE_SPEED \
            PLANE_CLOUD_SPEED PLANE_CLOUD_SCALE PLANE_CLOUD_DENSITY PLANE_CLOUD_AMOUNT PLANE_CLOUD_OCTAVES \
            PLANE_CLOUD_HEIGHT PLANE_CLOUD_OCTAVE_SCALE PLANE_CLOUD_OCTAVE_FADE PLANE_CLOUD_FADE_DISTANCE \
            CLOUD_REALISTIC_HQ_SAMPLES CLOUD_REALISTIC_SHADOWLIGHT_SAMPLES CLOUD_REALISTIC_SHADOWLIGHT_OCTAVES \
            CLOUD_REALISTIC_OCTAVES CLOUD_REALISTIC_DENSITY CLOUD_REALISTIC_OCTAVE_SCALE CLOUD_REALISTIC_OCTAVE_FADE \
            CLOUD_REALISTIC_AMOUNT CLOUD_REALISTIC_RAIN_INCREAMENT CLOUD_REALISTIC_OFFSET_X CLOUD_REALISTIC_OFFSET_Z CLOUD_REALISTIC_HEIGHT CLOUD_REALISTIC_THICKNESS \
            CLOUD_REALISTIC_CENTER CLOUD_REALISTIC_HARDNESS \
            CLOUD_REALISTIC_BASIC_SHADOWLIGHT CLOUD_REALISTIC_BASIC_SKYLIGHT \
            CLOUD_REALISTIC_SHADOWLIGHT_STEPSCALE CLOUD_REALISTIC_FADE_DISTANCE \
            VANILLA_BLOCK_LIGHT_FADE SUNLIGHT_BRIGHTNESS NIGHT_BRIGHTNESS NIGHT_VISION_BRIGHTNESS \
            LIGHT_BRIGHTNESS LIGHT_COLOR_R LIGHT_COLOR_G LIGHT_COLOR_B VB_TRACE_COUNT VB_STEPS VB_GI_LENGTH VB_AO_LENGTH VB_MAX_BLEDED_FRAMES \
            MOTION_BLUR_STRENGTH MOTION_BLUR_QUALITY DISTORTION_STRENGTH BLOOM_INTENSITY VIGNETTE_STRENGTH \
            TONEMAPPING GAMMA SATURATION COLOR_TEMPERATURE CONTRAST MINIMUM_BRIGHTNESS BLACK_TIGHTNESS AGX_LOOK AGX_EV_MIN AGX_EV_MAX \
            EXPOSURE_VALUE AVERAGE_EXPOSURE_CENTER_WEIGHT AVERAGE_EXPOSURE_STRENGTH AVERAGE_EXPOSURE_TENDENCY \
            COC_SPREAD_SAMPLES DOF_SAMPLES FOCAL_LENGTH APERTURE_DIAMETER_SCALE MAX_BLUR_RADIUS centerDepthHalflife \
            MANUAL_FOCUS_DEPTH LENS_DIAMETER_SCALE APERTURE_CORROSION_OFFSET \
            CHROMATIC_DISPERSION_R CHROMATIC_DISPERSION_G CHROMATIC_DISPERSION_B SHARPENING_SRENGTH SHARPENING_LIMIT \
            WATER_ABSORPTION_R WATER_ABSORPTION_G WATER_ABSORPTION_B  SNOW_FOG_DENSITY LAVA_FOG_DENSITY LAVA_FOG_BRIGHTNESS \
            NETHER_FOG_DENSITY NETHER_FOG_BRIGHTNESS END_FOG_DENSITY END_FOG_BRIGHTNESS END_GALAXY_AMOUNT END_GALAXY_BRIGHTNESS \
            RAIN_PUDDLE RIPPLE_SPEED RIPPLE_SCALE RIPPLE_STRENGTH RIPPLE_FADE_SPEED RAIN_DROP_SIZE RAIN_DROP_AMOUNT

uniform.vec2.screenSize = vec2(viewWidth, viewHeight)
uniform.vec2.texelSize = vec2(1.0 / viewWidth, 1.0 / viewHeight)

variable.float.hasWeather = if(rainfall > 0.01, 1.0, 0.0)
variable.float.hasWeatherSmooth = smooth(1, hasWeather, 50.0, 50.0)
variable.float.hasRainSmooth = smooth(2, if(temperature > 0.15, 1.0, 0.0) * hasWeather, 50.0, 50.0)
uniform.float.weatherStrength = wetness * hasWeatherSmooth
uniform.float.rainyStrength = wetness * hasRainSmooth

variable.int.frameIndex = frameCounter % 16
variable.float.jitterX = frac(0.5 + frameIndex * 0.7548776269)
variable.float.jitterY = frac(0.5 + frameIndex * 0.5698402524)
uniform.vec2.taaOffset = vec2((jitterX * 2.0 - 1.0) / viewWidth, (jitterY * 2.0 - 1.0) / viewHeight)
uniform.vec2.taaOffsetVX = vec2((jitterX * 2.0 - 1.0) / viewWidth, (jitterY * 2.0 - 1.0) / viewHeight)
variable.int.prevFrameIndex = (frameCounter - 1) % 16
variable.float.prevJitterX = frac(0.5 + prevFrameIndex * 0.7548776269)
variable.float.prevJitterY = frac(0.5 + prevFrameIndex * 0.5698402524)
uniform.vec2.prevTaaOffset = vec2((prevJitterX - 0.5) / viewWidth, (prevJitterY - 0.5) / viewHeight)

uniform.vec3.cameraMovement = vec3(cameraPosition.x - previousCameraPosition.x, cameraPosition.y - previousCameraPosition.y, cameraPosition.z - previousCameraPosition.z)

variable.float.lightAngle = if(sunAngle < 0.5, 1.0, -1.0)
uniform.vec3.shadowDirection = vec3(shadowModelViewInverse.2.0, shadowModelViewInverse.2.1, shadowModelViewInverse.2.2)
uniform.vec3.sunDirection = vec3(shadowModelViewInverse.2.0 * lightAngle, shadowModelViewInverse.2.1 * lightAngle, shadowModelViewInverse.2.2 * lightAngle)

uniform.vec3.shadowModelViewProj0 = \
    vec3( \
        shadowModelView.0.0 * shadowProjection.0.0 + shadowModelView.0.1 * shadowProjection.1.0 + shadowModelView.0.2 * shadowProjection.2.0, \
        shadowModelView.0.0 * shadowProjection.0.1 + shadowModelView.0.1 * shadowProjection.1.1 + shadowModelView.0.2 * shadowProjection.2.1, \
        shadowModelView.0.0 * shadowProjection.0.2 + shadowModelView.0.1 * shadowProjection.1.2 + shadowModelView.0.2 * shadowProjection.2.2  \
    )
uniform.vec3.shadowModelViewProj1 = \
    vec3( \
        shadowModelView.1.0 * shadowProjection.0.0 + shadowModelView.1.1 * shadowProjection.1.0 + shadowModelView.1.2 * shadowProjection.2.0, \
        shadowModelView.1.0 * shadowProjection.0.1 + shadowModelView.1.1 * shadowProjection.1.1 + shadowModelView.1.2 * shadowProjection.2.1, \
        shadowModelView.1.0 * shadowProjection.0.2 + shadowModelView.1.1 * shadowProjection.1.2 + shadowModelView.1.2 * shadowProjection.2.2  \
    )
uniform.vec3.shadowModelViewProj2 = \
    vec3( \
        shadowModelView.2.0 * shadowProjection.0.0 + shadowModelView.2.1 * shadowProjection.1.0 + shadowModelView.2.2 * shadowProjection.2.0, \
        shadowModelView.2.0 * shadowProjection.0.1 + shadowModelView.2.1 * shadowProjection.1.1 + shadowModelView.2.2 * shadowProjection.2.1, \
        shadowModelView.2.0 * shadowProjection.0.2 + shadowModelView.2.1 * shadowProjection.1.2 + shadowModelView.2.2 * shadowProjection.2.2  \
    )
uniform.vec3.shadowModelViewProj3 = \
    vec3( \
        shadowModelView.3.0 * shadowProjection.0.0 + shadowModelView.3.1 * shadowProjection.1.0 + shadowModelView.3.2 * shadowProjection.2.0 + shadowModelView.3.3 * shadowProjection.3.0, \
        shadowModelView.3.0 * shadowProjection.0.1 + shadowModelView.3.1 * shadowProjection.1.1 + shadowModelView.3.2 * shadowProjection.2.1 + shadowModelView.3.3 * shadowProjection.3.1, \
        shadowModelView.3.0 * shadowProjection.0.2 + shadowModelView.3.1 * shadowProjection.1.2 + shadowModelView.3.2 * shadowProjection.2.2 + shadowModelView.3.3 * shadowProjection.3.2  \
    )

variable.float.viewShadowDirectionX = shadowModelViewInverse.2.0 * gbufferModelView.0.0 + shadowModelViewInverse.2.1 * gbufferModelView.1.0 + shadowModelViewInverse.2.2 * gbufferModelView.2.0
variable.float.viewShadowDirectionY = shadowModelViewInverse.2.0 * gbufferModelView.0.1 + shadowModelViewInverse.2.1 * gbufferModelView.1.1 + shadowModelViewInverse.2.2 * gbufferModelView.2.1
variable.float.viewShadowDirectionZ = shadowModelViewInverse.2.0 * gbufferModelView.0.2 + shadowModelViewInverse.2.1 * gbufferModelView.1.2 + shadowModelViewInverse.2.2 * gbufferModelView.2.2
uniform.vec3.viewShadowDirection = vec3(viewShadowDirectionX, viewShadowDirectionY, viewShadowDirectionZ)

variable.float.groundRayleighAbsorption = 246818.1204632377 / (27.3786090825 * shadowModelViewInverse.2.1 + 1.0)
variable.float.groundMieAbsorption = 2.7853950253 / (72.8668877703 * shadowModelViewInverse.2.1 + 1.0)
variable.float.sunsetClamp = clamp(shadowModelViewInverse.2.1 * 30.0, 0.0, 1.0)
uniform.vec3.sunlightColor = vec3( \
    sunsetClamp * exp(-groundRayleighAbsorption * 0.0000073 - groundMieAbsorption), \
    sunsetClamp * exp(-groundRayleighAbsorption * 0.0000171 - groundMieAbsorption), \
    sunsetClamp * exp(-groundRayleighAbsorption * 0.0000298 - groundMieAbsorption) \
)

uniform.float.rainyMieBeta = 0.000021 * (1.0 + 10.0 * weatherStrength * exp(-cameraPosition.y / 2000.0))
