# Optifine needs this to be explicitly set. I hate Optifine.
oldLighting=false
vignette=false
underwaterOverlay=false

#ifdef ROUND_SUN
sun=off
moon=off
#endif

#ifdef FANCY_CLOUDS
clouds=off
#endif

particles.ordering=mixed

texture.deferred.noisetex=/lib/cloud_noise+normal.png
texture.gbuffers.noisetex=/lib/cloud_noise+normal.png
texture.composite.colortex3=/lib/smaaArea.png
texture.composite.colortex5=/lib/smaaSearch.png

# Disable blur passes when there's no bloom
program.world0/composite2.enabled=BLOOM
program.world0/composite3.enabled=BLOOM
program.world0/composite4.enabled=BLOOM
program.world0/composite5.enabled=BLOOM
program.world0/composite6.enabled=BLOOM
program.world0/composite7.enabled=BLOOM
program.world-1/composite2.enabled=BLOOM
program.world-1/composite3.enabled=BLOOM
program.world-1/composite4.enabled=BLOOM
program.world-1/composite5.enabled=BLOOM
program.world-1/composite6.enabled=BLOOM
program.world-1/composite7.enabled=BLOOM
program.world1/composite2.enabled=BLOOM
program.world1/composite3.enabled=BLOOM
program.world1/composite4.enabled=BLOOM
program.world1/composite5.enabled=BLOOM
program.world1/composite6.enabled=BLOOM
program.world1/composite7.enabled=BLOOM

program.world1/composite9.enabled=SMAA
program.world-1/composite9.enabled=SMAA
program.world0/composite9.enabled=SMAA
program.world1/composite10.enabled=SMAA
program.world-1/composite10.enabled=SMAA
program.world0/composite10.enabled=SMAA
program.world1/composite11.enabled=SMAA
program.world-1/composite11.enabled=SMAA
program.world0/composite11.enabled=SMAA

program.world1/composite12.enabled=DOF
program.world-1/composite12.enabled=DOF
program.world0/composite12.enabled=DOF

profile.FAST=!BLOOM !FANCY_CLOUDS !WATER_NORMALS TAA_MODE=0 !SMAA REFLECTIONS=0 !GODRAYS !SSAO
profile.FANCY=BLOOM FANCY_CLOUDS WATER_NORMALS TAA_MODE=0 !SMAA REFLECTIONS=3 !GODRAYS !SSAO
profile.FABULOUS=BLOOM FANCY_CLOUDS WATER_NORMALS TAA_MODE=1 SMAA REFLECTIONS=2 GODRAYS SSAO

# Options config
screen=<profile> INFO <empty> <empty> [TERRAIN] [COLORS] [FOG] [SKY] [WATER] [DH_SETTINGS] [CAMERA] [POST] [DEBUG]
screen.FOG=BORDER_FOG <empty> ATMOSPHERIC_FOG ATM_FOG_STRENGTH GODRAYS GODRAYS_QUALITY
screen.POST=TONEMAP_OPERATOR [COLOR_GRADING] <empty> <empty> BLOOM [BLOOM_SETTINGS] <empty> <empty> [ANTI_ALIASING] <empty> SSAO SSAO_STRENGTH SSAO_SCALE
screen.TERRAIN=WAVY_PLANTS [WAVING_BLOCK_SETTINGS] HANDHELD_LIGHTS HANDHELD_FALLOFF_CURVE MOON_PHASE_INFLUENCE <empty> LM_FALLOFF_CURVE MIN_LIGHT_AMOUNT LM_FLICKER LM_FLICKER_STRENGTH
screen.SKY=FANCY_CLOUDS [CLOUDS] AURORA_BOREALIS [AURORA_SETTINGS] ROUND_SUN sunPathRotation CUSTOM_SKYBOXES CUSTOM_SKYBOX_BRIGHTNESS STAR_SIZE STAR_STRENGTH RAIN_SKY_DARKENING RAIN_SKY_DESATURATION
screen.SKY.columns=2
screen.CLOUDS=CLOUD_OPACITY CLOUD_AMOUNT CLOUD_SPEED CLOUD_QUALITY VANILLA_CLOUD_DISTANCE
screen.AURORA_SETTINGS=AURORA_STRENGTH AURORA_HEIGHT AURORA_EVERYWHERE
screen.CAMERA=FILM_GRAIN FILM_GRAIN_STRENGTH VIGNETTE_OPACITY VIGNETTE_FALLOFF MOTION_BLUR MOTION_BLUR_STRENGTH DOF [DOF_SETTINGS]
screen.WATER=REFLECTIONS REFLECT_SUN SSR_STEPS <empty> WATER_FOG_STRENGTH <empty> WATER_NORMALS [WATER_NORMAL_SETTINGS] <empty> <empty> WATER_TEXTURE_MODE
screen.WATER_NORMAL_SETTINGS=WATER_NORMAL_STRENGTH WATER_NORMAL_SIZE WATER_NORMAL_SPEED
screen.COLORS=COLOR_SCHEME <empty> <empty> <empty> [OVERWORLD_COLORS] [NETHER_COLORS] [END_COLORS] [OTHER_COLORS]
screen.OVERWORLD_COLORS=[SKY_G_COLORS] [SKY_T_COLORS] [SUN_COLORS] <empty> <empty> <empty> SUNRISE_AMBIENT NOON_AMBIENT SUNSET_AMBIENT NIGHT_AMBIENT
screen.NETHER_COLORS=NETHER_AMBIENT_R NETHER_AMBIENT_G NETHER_AMBIENT_B
screen.END_COLORS=END_AMBIENT_R END_AMBIENT_G END_AMBIENT_B <empty> <empty> <empty> END_DIRECT_R END_DIRECT_G END_DIRECT_B <empty> <empty> <empty> END_SKY_T_R END_SKY_T_G END_SKY_T_B <empty> <empty> <empty> END_AURORA1_R END_AURORA1_G END_AURORA1_B END_AURORA2_R END_AURORA2_G END_AURORA2_B
screen.OTHER_COLORS=LM_RED LM_GREEN LM_BLUE <empty> <empty> <empty> WATER_RED WATER_GREEN WATER_BLUE WATER_ALPHA BIOME_WATER_CONTRIBUTION BIOME_SKY_CONTRIBUTION
screen.SUN_COLORS=NOON_RED NOON_GREEN NOON_BLUE <empty> <empty> <empty> SUNRISE_RED SUNRISE_GREEN SUNRISE_BLUE <empty> <empty> <empty> SUNSET_RED SUNSET_GREEN SUNSET_BLUE <empty> <empty> <empty> MOON_RED MOON_GREEN MOON_BLUE
screen.SKY_G_COLORS=NOON_SKY_G_R NOON_SKY_G_G NOON_SKY_G_B <empty> <empty> <empty> SUNRISE_SKY_G_R SUNRISE_SKY_G_G SUNRISE_SKY_G_B <empty> <empty> <empty> SUNSET_SKY_G_R SUNSET_SKY_G_G SUNSET_SKY_G_B <empty> <empty> <empty> NIGHT_SKY_G_R NIGHT_SKY_G_G NIGHT_SKY_G_B <empty> <empty> <empty> SUN_GLARE_R SUN_GLARE_G SUN_GLARE_B
screen.SKY_T_COLORS=NOON_SKY_T_R NOON_SKY_T_G NOON_SKY_T_B <empty> <empty> <empty> SUNRISE_SKY_T_R SUNRISE_SKY_T_G SUNRISE_SKY_T_B <empty> <empty> <empty> SUNSET_SKY_T_R SUNSET_SKY_T_G SUNSET_SKY_T_B <empty> <empty> <empty> NIGHT_SKY_T_R NIGHT_SKY_T_G NIGHT_SKY_T_B
screen.COLOR_GRADING=EXPOSURE SATURATION CONTRAST VIBRANCE <empty> <empty> TONEMAP_MIN_R TONEMAP_MIN_G TONEMAP_MIN_B
screen.DH_SETTINGS=DH_NOISE DH_NOISE_SIZE DH_CUTOFF
screen.WAVING_BLOCK_SETTINGS=WAVE_AMPLITUDE WAVE_SPEED WAVE_SIZE WAVE_LEAVES RAIN_TILT_STRENGTH
screen.BLOOM_SETTINGS=BLOOM_STRENGTH BLOOM_CURVE
screen.DOF_SETTINGS=DOF_APERTURE_SIZE DOF_BLUR_QUALITY DOF_FOCUS_ADJUSTMENT_SPEED <empty> DOF_MANUAL_FOCUS DOF_FOCUS_DISTANCE DOF_SHOW_FOCUS
screen.ANTI_ALIASING=TAA_MODE SMAA TAA_BLEND_FACTOR SMAA_THRESHOLD TAA_OFFCENTER_REJECTION SMAA_SEARCH_DISTANCE <empty> <empty> IMAGE_SHARPENING SHARPENING
screen.DEBUG=DEBUG_SHOW_BUFFER DEBUG_OVERRIDE_SKY

sliders=LM_RED LM_GREEN LM_BLUE NOON_RED NOON_GREEN NOON_BLUE SUNRISE_RED SUNRISE_GREEN SUNRISE_BLUE SUNSET_RED SUNSET_GREEN SUNSET_BLUE MOON_RED MOON_GREEN MOON_BLUE MIN_LIGHT_AMOUNT BLOOM_STRENGTH EXPOSURE SATURATION CLOUD_OPACITY CLOUD_AMOUNT CLOUD_QUALITY CLOUD_SPEED RAIN_TILT_STRENGTH CONTRAST VIBRANCE WAVE_AMPLITUDE WAVE_SPEED WAVE_SIZE TONEMAP_MIN_R TONEMAP_MIN_G TONEMAP_MIN_B BLOOM_CURVE STAR_SIZE STAR_STRENGTH SUNRISE_AMBIENT NOON_AMBIENT SUNSET_AMBIENT NIGHT_AMBIENT NOON_SKY_G_R NOON_SKY_G_G NOON_SKY_G_B SUNRISE_SKY_G_R SUNRISE_SKY_G_G SUNRISE_SKY_G_B SUNSET_SKY_G_R SUNSET_SKY_G_G SUNSET_SKY_G_B NIGHT_SKY_G_R NIGHT_SKY_G_G NIGHT_SKY_G_B NOON_SKY_T_R NOON_SKY_T_G NOON_SKY_T_B SUNRISE_SKY_T_R SUNRISE_SKY_T_G SUNRISE_SKY_T_B SUNSET_SKY_T_R SUNSET_SKY_T_G SUNSET_SKY_T_B NIGHT_SKY_T_R NIGHT_SKY_T_G NIGHT_SKY_T_B SHARPENING END_SKY_T_R END_SKY_T_G END_SKY_T_B END_AURORA1_R END_AURORA1_G END_AURORA1_B END_AURORA2_R END_AURORA2_G END_AURORA2_B ENCHANT_GLINT_OPACITY FILM_GRAIN_STRENGTH VIGNETTE_FALLOFF VIGNETTE_OPACITY SSAO_STRENGTH SSAO_SCALE ATM_FOG_STRENGTH WATER_RED WATER_GREEN WATER_BLUE WATER_ALPHA WATER_FOG_STRENGTH WATER_NORMAL_STRENGTH SSR_STEPS DH_CUTOFF DH_NOISE_SIZE GODRAYS_QUALITY MOTION_BLUR_STRENGTH HANDHELD_FALLOFF_CURVE LM_FALLOFF_CURVE MOON_PHASE_INFLUENCE BIOME_WATER_CONTRIBUTION WATER_NORMAL_SIZE WATER_NORMAL_SPEED TAA_BLEND_FACTOR TAA_OFFCENTER_REJECTION sunPathRotation RAIN_SKY_DARKENING RAIN_SKY_DESATURATION NETHER_AMBIENT_R NETHER_AMBIENT_G NETHER_AMBIENT_B END_AMBIENT_R END_AMBIENT_G END_AMBIENT_B END_DIRECT_R END_DIRECT_G END_DIRECT_B SUN_GLARE_R SUN_GLARE_G SUN_GLARE_B VANILLA_CLOUD_DISTANCE SMAA_THRESHOLD SMAA_SEARCH_DISTANCE LM_FLICKER LM_FLICKER_STRENGTH AURORA_STRENGTH AURORA_HEIGHT CUSTOM_SKYBOX_BRIGHTNESS DOF_APERTURE_SIZE DOF_BLUR_QUALITY DOF_FOCUS_ADJUSTMENT_SPEED DOF_FOCUS_DISTANCE BIOME_SKY_CONTRIBUTION
# Custom uniforms
uniform.float.timeAngle=worldTime/24000.0
# Workaround for sunAngle not working on optifine. I hate optifine
variable.float.d=timeAngle-0.25
variable.float.e=0.5-cos(d*3.1415)/2.0
variable.float.timeThing=(d*2.0+e)/3.0
uniform.float.sunAngleAtHome=if(timeThing < 0.75, timeThing+0.25, timeThing-0.75)

variable.float.gr=1.32471795724474602596
#if TAA_MODE == 4
variable.float.jitterX=if(frameCounter%2 == 0, 0.25, -0.25)
variable.float.jitterY=jitterX * -1.0
#else
variable.float.jitterX=frac(0.5 + frameCounter / gr) * 2 - 1
variable.float.jitterY=frac(0.5 + frameCounter / (gr*gr)) * 2 - 1
#endif
uniform.vec2.taaJitter=vec2(jitterX/viewWidth, jitterY/viewHeight)

uniform.float.nightStrength=min(abs(sin(timeAngle*2*pi))*2, 1)*floor(worldTime/12000)
uniform.float.dayStrength=min(abs(sin(timeAngle*2*pi))*2, 1)*(1-floor(worldTime/12000))
uniform.float.sunsetStrength=(1-nightStrength-dayStrength)*floor((worldTime/8000)%2)
uniform.float.sunriseStrength=(1-nightStrength-dayStrength)*(1-ceil(sunsetStrength))
uniform.vec2.resolution=vec2(viewWidth, viewHeight)
uniform.vec2.resolutionInv=vec2(1.0/viewWidth, 1.0/viewHeight)
variable.float.sunOrMoonPosx=if(sunAngleAtHome < 0.5, sunPosition.x, moonPosition.x)
variable.float.sunOrMoonPosy=if(sunAngleAtHome < 0.5, sunPosition.y, moonPosition.y)
variable.float.sunOrMoonPosz=if(sunAngleAtHome < 0.5, sunPosition.z, moonPosition.z)
variable.float.sunL=1/sqrt(sunPosition.x*sunPosition.x+sunPosition.y*sunPosition.y+sunPosition.z*sunPosition.z)
variable.float.sunOrMoonL=1/sqrt(sunOrMoonPosx*sunOrMoonPosx+sunOrMoonPosy*sunOrMoonPosy+sunOrMoonPosz*sunOrMoonPosz)
uniform.vec3.sunOrMoonPosN=vec3(sunOrMoonPosx*sunOrMoonL, sunOrMoonPosy*sunOrMoonL, sunOrMoonPosz*sunOrMoonL)
uniform.vec3.sunPosN=vec3(sunPosition.x*sunL, sunPosition.y*sunL, sunPosition.z*sunL)
uniform.float.isOutdoorsSmooth=smooth(if(eyeBrightness.y > 50, 1, 0), 10, 10)
uniform.float.precipitationSmooth=smooth(biome_precipitation, 150, 150)
uniform.float.fogAmount=(0.5 + sunriseStrength + nightStrength + smooth(if(biome == BIOME_PALE_GARDEN && nightStrength > 0.99, 50, temperature), 10, 10) + rainStrength + thunderStrength) * isOutdoorsSmooth * ATM_FOG_STRENGTH

alphaTest.gbuffers_skybasic=false
alphaTest.gbuffers_skytextured=false
alphaTest.gbuffers_clouds=GREATER 0.005

dhShadow.enabled=false

blend.composite5=ONE ONE ONE ONE
blend.composite6=ONE ONE ONE ONE