###############################################
#           Copyright (C) 2023 Belmu          #
#       GNU General Public License V3.0       #
###############################################

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

sun    = false
moon   = false
clouds = off

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

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

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

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

# World space celestial vectors uniforms from Zombye#7365 (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.shadowLightVectorNorm = 1.0 / sqrt((shadowLightPosition.x * shadowLightPosition.x) + (shadowLightPosition.y * shadowLightPosition.y) + (shadowLightPosition.z * shadowLightPosition.z))
uniform.vec3.shadowLightVectorView   = vec3(shadowLightPosition.x * shadowLightVectorNorm, shadowLightPosition.y * shadowLightVectorNorm, shadowLightPosition.z * shadowLightVectorNorm)
variable.float.shadowLightVectorX    = gbufferModelViewInverse.0.0 * shadowLightPosition.x + gbufferModelViewInverse.1.0 * shadowLightPosition.y + gbufferModelViewInverse.2.0 * shadowLightPosition.z
variable.float.shadowLightVectorY    = gbufferModelViewInverse.0.1 * shadowLightPosition.x + gbufferModelViewInverse.1.1 * shadowLightPosition.y + gbufferModelViewInverse.2.1 * shadowLightPosition.z
variable.float.shadowLightVectorZ    = gbufferModelViewInverse.0.2 * shadowLightPosition.x + gbufferModelViewInverse.1.2 * shadowLightPosition.y + gbufferModelViewInverse.2.2 * shadowLightPosition.z
uniform.vec3.shadowLightVector       = vec3(shadowLightVectorX * shadowLightVectorNorm, shadowLightVectorY * shadowLightVectorNorm, shadowLightVectorZ * shadowLightVectorNorm)

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

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

#texture.noise = image/blueNoise.png

# Clouds noise textures
texture.deferred.depthtex2    = image/shapeNoise.dat TEXTURE_3D RGBA8 128 128 128 RGBA UNSIGNED_BYTE
texture.deferred.shadowcolor1 = image/curl.dat TEXTURE_3D RGB8 32 32 32 RGB UNSIGNED_BYTE

##--------------------#  FILTER PASSES  #---------------------##

program.deferred5.enabled = GI_FILTER == 1
program.deferred6.enabled = GI_FILTER == 1
program.deferred7.enabled = GI_FILTER == 1
program.deferred8.enabled = GI_FILTER == 1
program.deferred9.enabled = GI_FILTER == 1

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

alphaTest.gbuffers_armor_glint = off
alphaTest.gbuffers_basic       = off
alphaTest.gbuffers_block       = 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_water       = off
alphaTest.gbuffers_weather     = off
alphaTest.shadow               = off

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

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

# Translucents
blend.gbuffers_armor_glint.colortex15 = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_weather                = off
blend.gbuffers_weather                = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_water                  = off
blend.gbuffers_water.colortex4        = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_hand_water             = off
blend.gbuffers_hand_water.colortex4   = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
blend.gbuffers_textured               = off
blend.gbuffers_textured.colortex4     = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO

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

# Profiles
profile.DEFAULT = RENDER_MODE=0 MAX_GI_STEPS=64 GI=0 GI_FILTER=1
profile.RENDER  = RENDER_MODE=1 MAX_GI_STEPS=80 GI=1 GI_FILTER=0 GI_TEMPORAL_ACCUMULATION=1

# Screens
screen = ABOUT <profile> RENDER_SCALE <empty> [LIGHTING] [ATMOSPHERICS] [TERRAIN] [CAMERA] [DEBUG]

screen.LIGHTING          = [RAYTRACING] [AMBIENT_OCCLUSION] BLOCKLIGHT_TEMPERATURE EMISSIVE_INTENSITY DIRECTIONAL_LIGHTMAP <empty> <empty> <empty> SUBSURFACE_SCATTERING MATERIAL_AO SHADOWS SPECULAR <empty> <empty> SHADOW_TYPE shadowMapResolution SHADOW_SAMPLES shadowDistance
screen.AMBIENT_OCCLUSION = AO AO_TYPE AO_FILTER AO_SCALE <empty> <empty> SSAO_SAMPLES SSAO_RADIUS RTAO_SAMPLES RTAO_STEPS GTAO_SLICES GTAO_RADIUS
screen.RAYTRACING        = REFLECTIONS REFRACTIONS REFLECTIONS_TYPE REFLECTIONS_SCALE <empty> <empty> GI [FILTER] SKY_CONTRIBUTION GI_SCALE GI_SAMPLES MAX_GI_BOUNCES <empty> <empty> BINARY_REFINEMENT SSR_REPROJECTION
screen.FILTER            = GI_FILTER GI_TEMPORAL_ACCUMULATION ATROUS_STEP_SIZE <empty> NORMAL_WEIGHT_SIGMA DEPTH_WEIGHT_SIGMA LUMINANCE_WEIGHT_SIGMA
screen.ATMOSPHERICS      = sunPathRotation CELESTIAL_SIZE_MULTIPLIER <empty> <empty> [ATMOSPHERE] [CLOUDS] [FOG] [STARS]
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> FOG_ALTITUDE FOG_THICKNESS FOG_DENSITY
screen.STARS             = STARS_AMOUNT STARS_LUMINOSITY
screen.TERRAIN           = [WATER] [POM] WHITE_WORLD WAVING_PLANTS <empty> <empty> RAIN_PUDDLES RAIN_PUDDLES_SIZE
screen.WATER             = WATER_CAUSTICS WATER_CAUSTICS_STRENGTH <empty> <empty> WATER_OCTAVES WAVE_STEEPNESS WAVE_AMPLITUDE WAVE_LENGTH <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_LAYERS POM_DEPTH <empty> POM_SHADOWING POM_DEPTH_WRITE
screen.CAMERA            = [CAMERA_SETTINGS] [ANTI_ALIASING] [COLOR_GRADING] [POST_PROCESSING]
screen.ANTI_ALIASING     = TAA <empty> TAA_STRENGTH TAA_OFFCENTER_REJECTION
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] EIGHT_BITS_FILTER <empty> <empty> BLOOM BLOOM_STRENGTH VIGNETTE VIGNETTE_STRENGTH FILM_GRAIN FILM_GRAIN_STRENGTH SHARPEN SHARPEN_STRENGTH CEL_SHADING CEL_SHADES
screen.DEPTH_OF_FIELD    = DOF DOF_SAMPLES <empty> DOF_RADIUS DOF_DEPTH
screen.DEBUG             = DEBUG_HISTOGRAM DEBUG_LUT

# Sliders
sliders = RENDER_SCALE \
          BLOCKLIGHT_TEMPERATURE EMISSIVE_INTENSITY \
          shadowMapResolution SHADOW_SAMPLES shadowDistance \
          AO_SCALE SSAO_SAMPLES SSAO_RADIUS RTAO_SAMPLES RTAO_STEPS GTAO_SLICES GTAO_RADIUS \
          REFLECTIONS_SCALE \
          ATROUS_STEP_SIZE NORMAL_WEIGHT_SIGMA DEPTH_WEIGHT_SIGMA LUMINANCE_WEIGHT_SIGMA \
          GI_SAMPLES MAX_GI_BOUNCES GI_SCALE \
          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_ALTITUDE FOG_THICKNESS FOG_DENSITY \
          STARS_AMOUNT STARS_LUMINOSITY \
          RAIN_PUDDLES_SIZE \
          WATER_CAUSTICS_STRENGTH WATER_OCTAVES WAVE_STEEPNESS WAVE_AMPLITUDE WAVE_LENGTH 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 \
          FOCAL F_STOPS ISO SHUTTER_SPEED \
          DOF_SAMPLES DOF_RADIUS DOF_DEPTH \
          LUT WHITE_BALANCE VIBRANCE SATURATION CONTRAST GAMMA GAIN LIFT \
          TAA_STRENGTH TAA_OFFCENTER_REJECTION BLOOM_STRENGTH VIGNETTE_STRENGTH FILM_GRAIN_STRENGTH SHARPEN_STRENGTH CEL_SHADES

# Columns
screen.columns                  = 1
screen.FILTER.columns           = 1
screen.ATMOSPHERE.columns       = 1
screen.FOG.columns              = 1
screen.STARS.columns            = 1
screen.WATER_ABSORPTION.columns = 3
screen.WATER_SCATTERING.columns = 3
screen.POM.columns              = 1
screen.CAMERA_SETTINGS.columns  = 1
screen.DEPTH_OF_FIELD.columns   = 1
screen.ANTI_ALIASING.columns    = 1

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

######################################
##                GI                ##
######################################

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

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

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

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

#if AO_SCALE == 10 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.10 0.10
#elif AO_SCALE == 15 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.15 0.15
#elif AO_SCALE == 20 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.20 0.20
#elif AO_SCALE == 25 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.25 0.25
#elif AO_SCALE == 30 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.30 0.30
#elif AO_SCALE == 35 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.35 0.35
#elif AO_SCALE == 40 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.40 0.40
#elif AO_SCALE == 45 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.45 0.45
#elif AO_SCALE == 50 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.50 0.50
#elif AO_SCALE == 55 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.55 0.55
#elif AO_SCALE == 60 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.60 0.60
#elif AO_SCALE == 65 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.65 0.65
#elif AO_SCALE == 70 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.70 0.70
#elif AO_SCALE == 75 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.75 0.75
#elif AO_SCALE == 80 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.80 0.80
#elif AO_SCALE == 85 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.85 0.85
#elif AO_SCALE == 90 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.90 0.90
#elif AO_SCALE == 95 && GI == 0 && AO == 1
    size.buffer.colortex12 = 0.95 0.95
#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 == 10
    size.buffer.colortex7 = 0.10 0.10
#elif CLOUDS_SCALE == 15
    size.buffer.colortex7 = 0.15 0.15
#elif CLOUDS_SCALE == 20
    size.buffer.colortex7 = 0.20 0.20
#elif CLOUDS_SCALE == 25
    size.buffer.colortex7 = 0.25 0.25
#elif CLOUDS_SCALE == 30
    size.buffer.colortex7 = 0.30 0.30
#elif CLOUDS_SCALE == 35
    size.buffer.colortex7 = 0.35 0.35
#elif CLOUDS_SCALE == 40
    size.buffer.colortex7 = 0.40 0.40
#elif CLOUDS_SCALE == 45
    size.buffer.colortex7 = 0.45 0.45
#elif CLOUDS_SCALE == 50
    size.buffer.colortex7 = 0.50 0.50
#elif CLOUDS_SCALE == 55
    size.buffer.colortex7 = 0.55 0.55
#elif CLOUDS_SCALE == 60
    size.buffer.colortex7 = 0.60 0.60
#elif CLOUDS_SCALE == 65
    size.buffer.colortex7 = 0.65 0.65
#elif CLOUDS_SCALE == 70
    size.buffer.colortex7 = 0.70 0.70
#elif CLOUDS_SCALE == 75
    size.buffer.colortex7 = 0.75 0.75
#elif CLOUDS_SCALE == 80
    size.buffer.colortex7 = 0.80 0.80
#elif CLOUDS_SCALE == 85
    size.buffer.colortex7 = 0.85 0.85
#elif CLOUDS_SCALE == 90
    size.buffer.colortex7 = 0.90 0.90
#elif CLOUDS_SCALE == 95
    size.buffer.colortex7 = 0.95 0.95
#endif

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

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