#
#   SETTINGS
#

profile.Low=!cloudVolumeEnabled !cloudVolume1Enabled !fogVolumeEnabled shadowMapResolution=1024 !shadowVPSEnabled shadowFilterIterations=9 !contactShadowsEnabled indirectResReduction=4 !SVGF_FILTER !ssptEnabled !motionblurToggle !cloudLayerShadowing !cloudShadowsEnabled
profile.Medium=profile.Low cloudVolumeEnabled shadowMapResolution=2048 shadowVPSEnabled motionblurToggle
profile.High=profile.Medium cloudVolume1Enabled fogVolumeEnabled shadowFilterIterations=12
profile.Ultra=profile.High shadowFilterIterations=15 contactShadowsEnabled SVGF_FILTER ssptEnabled cloudLayerShadowing cloudShadowsEnabled

screen=INFO <profile> <empty> [ATMOS] [LIGHT] [TERRAIN] [CAMERA] [POST] [MISC]
screen.columns=1

screen.ATMOS=sunPathRotation volumeWorldTimeAnim <empty> [CLOUDS] [FOG] [SKYCOL] [WATER] [DIMENSIONS]
screen.ATMOS.columns=1

    screen.CLOUDS=cloudVolumeEnabled cloudVolumeStoryMode cloudVolumeRounding cloudShadowsEnabled <empty> <empty> cloudVolume0Samples cloudVolume0Alt cloudVolume0Depth cloudVolume0Clip <empty> <empty> cloudVolume1Enabled cloudVolume1Samples cloudVolume1Alt cloudVolume1Depth cloudVolume1Clip cloudLayerShadowing

    screen.FOG=fogVolumeEnabled fogMistAdvanced fogAdaptiveSteps fogClipDist fogDensityMult mistMieAnisotropy <empty> <empty> fogEnabled fogStart fogFalloff

    screen.SKYCOL=skyRedMult skyGreenMult skyBlueMult <empty> skyHorRedMult skyHorGreenMult skyHorBlueMult
    screen.SKYCOL.columns=1

    screen.WATER=customWaterColor waterFogEnabled customWaterNormals waterParallaxEnabled waterWaveStrength <empty> waterRed waterGreen waterBlue waterAlpha waterTextureBlend waterDensity <empty> <empty> waterCoeffRed waterCoeffGreen waterCoeffBlue waterCoeffScatter

    screen.DIMENSIONS=NETHER_UseBiomeColors <empty> NETHER_AmbientSaturation NETHER_AmbientRed NETHER_AmbientGreen NETHER_AmbientBlue <empty> <empty> END_AmbientRed END_AmbientGreen END_AmbientBlue

screen.LIGHT=directionalLMEnabled UseLightleakPrevention <empty> [COLORS] [DIRECTLIGHT] [INDIRECTLIGHT]
screen.LIGHT.columns=1

    screen.COLORS=sunlightIllum moonlightIllum sunlightRedMult moonlightRedMult sunlightGreenMult moonlightGreenMult sunlightBlueMult moonlightBlueMult <empty> <empty> skylightIllum blocklightIllum skylightRedMult blocklightBaseTemp skylightGreenMult <empty> skylightBlueMult minimumAmbientIllum

    screen.DIRECTLIGHT=shadowMapResolution shadowVPSEnabled shadowPenumbraScale shadowFilterIterations contactShadowsEnabled subsurfaceScatterMode

    screen.INDIRECTLIGHT=indirectResReduction [FILTER] ssptEnabled ssptFullRangeRT ssptSPP ssptBounces ssptLightmapBlend ssptEmissionDistance <empty> <empty> ssptEmissionMode labEmissionCurve <empty> <empty> SSAO_Intensity fallbackSSAO textureAoEnabled
        screen.FILTER=SVGF_FILTER <empty> SVGF_RAD SVGF_STRICTNESS SVGF_NORMALEXP
        screen.FILTER.columns=1

screen.TERRAIN=normalmapEnabled normalmapFormat vertexAttributeFix refractionEnabled <empty> <empty> wetnessMode puddleRippleSpeed <empty> <empty> windEffectsEnabled windIntensity <empty> <empty> [PARALLAX] [REFLECTIONS]
screen.TERRAIN.columns=2

    screen.PARALLAX=pomEnabled pomSamples pomShadowSamples pomDepth <empty> slopeNormalCalculation
    screen.PARALLAX.columns=1

    screen.REFLECTIONS=resourcepackReflectionsEnabled specularHighlightsEnabled <empty> <empty> roughReflectionsEnabled roughReflectionSamples <empty> <empty> screenspaceReflectionsEnabled reflectionCaptureEnabled <empty> <empty> roughnessThreshold skyOcclusionThreshold
    screen.REFLECTIONS.columns=2

screen.CAMERA=camSensorWidth camFStops anamorphStretch [BLOOM] [DOF] [EXP] [FLARE] [MBLUR] [VIGNETTE]
screen.CAMERA.columns=1

    screen.BLOOM=bloomEnabled bloomIntensity <empty> bloomyFog
    screen.BLOOM.columns=1

    screen.DOF=DoFToggle DoFQuality DoFChromaDispersion chromaOffsetScale <empty> camFocus camManFocDis showFocusPlane
    screen.DOF.columns=1

    screen.EXP=LOCAL_EXPOSURE exposureComplexEnabled <empty> <empty> exposureDecay exposureBias exposureDarkClamp exposureBrightClamp exposureBrightPercentage exposureDarkPercentage exposureBrightWeight exposureDarkWeight exposureAverageWeight <empty> <empty> <empty> manualExposureEnabled manualExposureValue
    screen.EXP.columns=2

    screen.FLARE=lensFlareToggle lensFlareHaloToggle lensFlareIntensity lensFlareThreshold <empty> <empty> lensFlareGhostCount lensFlareGhostSpace lensFlareHaloRad lensFlareHaloDepth <empty> <empty> legacyFlareToggle legacyFlareIntensity

    screen.MBLUR=motionblurToggle <empty> motionblurSamples motionblurScale
    screen.MBLUR.columns=1

    screen.VIGNETTE=vignetteEnabled <empty> vignetteStart vignetteEnd vignetteIntensity vignetteExponent
    screen.VIGNETTE.columns=1

screen.POST=ResolutionScale CAS_Strength screenBitdepth VIEWPORT_GAMUT <empty> [ACES] [AA] [CGRADE] [FTOOL]
screen.POST.columns=1

    screen.ACES=acesRRTExposureBias acesRRTGammaLift acesRRTGlowGainOffset acesRRTSatOffset acesODTSatOffset
    screen.ACES.columns=1

    screen.AA=RESAMPLING_PARAM TAAU_FXAA_PostPass <empty> taaBlendWeight taaAntiFlicker taaLumaRejection
    screen.AA.columns=1

    screen.CGRADE=doColorgrading <empty> <empty> <empty> vibranceInt saturationInt gammaCurve brightnessInt constrastInt <empty> colorlumR colorlumG colorlumB

    screen.FTOOL=framingToolEnabled framingThirdsHor framingToAspect framingAspectX framingAspectY framingToAspectCenter
    screen.FTOOL.columns=1

screen.MISC=[INTERNAL] DEBUG_VIEW <empty> <empty> freezeAtmosAnim atmosAnimOffset

    screen.INTERNAL=*
    

sliders= sunPathRotation cloudVolumeRounding cloudVolume1Samples cloudVolume1Alt cloudVolume1Depth cloudVolume0Samples cloudVolume0Alt cloudVolume0Depth cloudVolume0Clip cloudVolume1Clip \
 fogAdaptiveSteps fogClipDist fogDensityMult mistMieAnisotropy fogStart fogFalloff skyRedMult skyGreenMult skyBlueMult skyHorRedMult skyHorGreenMult skyHorBlueMult \
 waterRed waterGreen waterBlue waterAlpha waterTextureBlend waterDensity waterCoeffRed waterCoeffGreen waterCoeffBlue waterCoeffScatter \
 NETHER_AmbientSaturation NETHER_AmbientRed NETHER_AmbientGreen NETHER_AmbientBlue END_AmbientRed END_AmbientGreen END_AmbientBlue \
 shadowMapResolution shadowPenumbraScale shadowFilterIterations indirectResReduction ssptSPP ssptBounces ssptLightmapBlend ssptEmissionDistance labEmissionCurve SSAO_Intensity \
 sunlightIllum moonlightIllum sunlightRedMult moonlightRedMult sunlightGreenMult moonlightGreenMult sunlightBlueMult moonlightBlueMult skylightIllum blocklightIllum skylightRedMult blocklightBaseTemp skylightGreenMult skylightBlueMult minimumAmbientIllum SVGF_RAD SVGF_STRICTNESS SVGF_NORMALEXP \
 windIntensity puddleRippleSpeed pomSamples pomShadowSamples pomDepth roughReflectionSamples roughnessThreshold skyOcclusionThreshold \
 camSensorWidth camFStops anamorphStretch bloomIntensity DoFQuality chromaOffsetScale camManFocDis \
 exposureDecay exposureBias manualExposureValue exposureDarkClamp exposureBrightClamp exposureBrightPercentage exposureDarkPercentage exposureBrightWeight exposureDarkWeight \
 lensFlareIntensity lensFlareThreshold lensFlareGhostCount lensFlareGhostSpace lensFlareHaloRad lensFlareHaloDepth legacyFlareIntensity \
 motionblurSamples motionblurScale vignetteStart vignetteEnd vignetteIntensity vignetteExponent \
 acesRRTExposureBias acesRRTGammaLift acesRRTGlowGainOffset acesRRTSatOffset acesODTSatOffset \
 taaBlendWeight taaMotionRejection taaAntiGhosting taaAntiFlicker taaLumaRejection taaHueRejection \
 vibranceInt saturationInt gammaCurve brightnessInt constrastInt colorlumR colorlumG colorlumB CAS_Strength \
 framingAspectX framingAspectY framingToAspectCenter \
 atmosAnimOffset planetRadiusScale waterWaveStrength

version.1.16.5=G8
version.1.16.4=G8

oldLighting=false
oldHandLight=false
vignette=false
separateAo=true
underwaterOverlay=false
sun=true
moon=true
fog=off
rain.depth=false
clouds=off
supportsColorCorrection=true

blend.gbuffers_basic=off
blend.gbuffers_block=off
blend.gbuffers_terrain=off
blend.gbuffers_entities=off
blend.gbuffers_hand=off
blend.gbuffers_spidereyes=SRC_ALPHA ONE ZERO ONE
blend.gbuffers_armor_glint=SRC_ALPHA ONE ZERO ONE
blend.gbuffers_textured=off
blend.gbuffers_skybasic=off
blend.gbuffers_skytextured=SRC_ALPHA ONE ZERO ONE
blend.gbuffers_textured_lit=off
blend.gbuffers_clouds=off
blend.deferred=off
blend.prepare=off
blend.shadow=off

blend.gbuffers_water.colortex1=off
blend.gbuffers_water.colortex2=off
blend.gbuffers_water.colortex3=off
blend.gbuffers_translucent.colortex1=off
blend.gbuffers_translucent.colortex2=off
blend.gbuffers_translucent.colortex3=off

blend.gbuffers_hand_water.colortex1=off
blend.gbuffers_hand_water.colortex2=off
blend.gbuffers_hand_water.colortex3=off

size.buffer.colortex4=256 256
size.buffer.colortex10=1024 512
size.buffer.colortex11=1024 512

texture.noise=image/noise2D.png

texture.prepare.colortex7=minecraft:textures/environment/clouds.png
texture.composite.colortex7=minecraft:textures/environment/clouds.png
#customTexture.CloudTexture=minecraft:textures/environment/clouds.png

program.world0/deferred3.enabled=ssptEnabled
program.world0/deferred4.enabled=SVGF_FILTER
program.world0/deferred5.enabled=SVGF_FILTER
program.world0/deferred6.enabled=SVGF_FILTER
program.world0/deferred7.enabled=SVGF_FILTER
program.world0/deferred8.enabled=SVGF_FILTER
program.world0/deferred9.enabled=ssptEnabled

program.world0/composite.enabled=reflectionCaptureEnabled


#       TAA OFFSET
# variable.int.fmod8 = frameCounter % 8
# uniform.vec2.taaOffset = vec2((if( \
#    fmod8 == 0,  0.125, \
#    fmod8 == 1, -0.125, \
#    fmod8 == 2,  0.625, \
#    fmod8 == 3,  0.375, \
#    fmod8 == 4, -0.625, \
#    fmod8 == 5, -0.875, \
#    fmod8 == 6,  0.375, \
#    fmod8 == 7,  0.875, \
#    0.0)*0.6) / viewWidth, \
#    (if( \
#    fmod8 == 0, -0.375, \
#    fmod8 == 1,  0.375, \
#    fmod8 == 2,  0.125, \
#    fmod8 == 3, -0.625, \
#    fmod8 == 4,  0.625, \
#    fmod8 == 5, -0.125, \
#   fmod8 == 6, -0.875, \
#    fmod8 == 7,  0.875, \
#    0.0)*0.6) / viewHeight)

#
#   TAA Offsets by Zombye
#

uniform.float.frameR1 = frac(0.5 + frameCounter / 1.61803398874989484820458683436563)
variable.float.frameR2X = frac(0.5 + frameCounter / 1.32471795724474602596090885447809)
variable.float.frameR2Y = frac(0.5 + frameCounter / (1.32471795724474602596090885447809 * 1.32471795724474602596090885447809))
uniform.vec2.frameR2 = vec2(frameR2X, frameR2Y)

# TAA offset
uniform.vec2.taaOffset = vec2((frameR2X * 2.0 - 1.0) / viewWidth, (frameR2Y * 2.0 - 1.0) / viewHeight)



uniform.float.worldAnimTime = worldDay % 48 + worldTime / 24000.0

#       RESOLUTION UNIFORMS
uniform.vec2.viewSize = vec2(viewWidth, viewHeight)
uniform.vec2.pixelSize = vec2(1.0 / viewWidth, 1.0 / viewHeight)

variable.float.bloomYres    = min(1080.0, viewHeight)
variable.float.bloomXres    = bloomYres * aspectRatio
uniform.vec2.bloomResolution = vec2(bloomXres, bloomYres)


#       DIRECTIONS
variable.float.upDirNorm    = 1.0 / sqrt((upPosition.x*upPosition.x) + (upPosition.y*upPosition.y) + (upPosition.z*upPosition.z))
uniform.vec3.upDirView      = vec3(upPosition.x*upDirNorm, upPosition.y*upDirNorm, upPosition.z*upDirNorm)
uniform.vec3.upDir          = vec3(0.0, 1.0, 0.0)

variable.float.sunDirNorm   = 1.0 / sqrt((sunPosition.x * sunPosition.x) + (sunPosition.y * sunPosition.y) + (sunPosition.z * sunPosition.z))
variable.float.svecX        = sunPosition.x * sunDirNorm
variable.float.svecY        = sunPosition.y * sunDirNorm
variable.float.svecZ        = sunPosition.z * sunDirNorm
uniform.vec3.sunDirView     = vec3(svecX, svecY, svecZ)
variable.float.sunDirX      = gbufferModelViewInverse.0.0 * sunPosition.x + gbufferModelViewInverse.1.0 * sunPosition.y + gbufferModelViewInverse.2.0 * sunPosition.z
variable.float.sunDirY      = gbufferModelViewInverse.0.1 * sunPosition.x + gbufferModelViewInverse.1.1 * sunPosition.y + gbufferModelViewInverse.2.1 * sunPosition.z
variable.float.sunDirZ      = gbufferModelViewInverse.0.2 * sunPosition.x + gbufferModelViewInverse.1.2 * sunPosition.y + gbufferModelViewInverse.2.2 * sunPosition.z
uniform.vec3.sunDir         = vec3(sunDirX * sunDirNorm, sunDirY * sunDirNorm, sunDirZ * sunDirNorm)

variable.float.moonDirNorm  = 1.0 / sqrt((moonPosition.x * moonPosition.x) + (moonPosition.y * moonPosition.y) + (moonPosition.z * moonPosition.z))
variable.float.mvecX        = moonPosition.x * moonDirNorm
variable.float.mvecY        = moonPosition.y * moonDirNorm
variable.float.mvecZ        = moonPosition.z * moonDirNorm
uniform.vec3.moonDirView    = vec3(mvecX, mvecY, mvecZ)
variable.float.moonDirX     = gbufferModelViewInverse.0.0 * moonPosition.x + gbufferModelViewInverse.1.0 * moonPosition.y + gbufferModelViewInverse.2.0 * moonPosition.z
variable.float.moonDirY     = gbufferModelViewInverse.0.1 * moonPosition.x + gbufferModelViewInverse.1.1 * moonPosition.y + gbufferModelViewInverse.2.1 * moonPosition.z
variable.float.moonDirZ     = gbufferModelViewInverse.0.2 * moonPosition.x + gbufferModelViewInverse.1.2 * moonPosition.y + gbufferModelViewInverse.2.2 * moonPosition.z
uniform.vec3.moonDir        = vec3(moonDirX * moonDirNorm, moonDirY * moonDirNorm, moonDirZ * moonDirNorm)



variable.float.shadowmapLightDirX = shadowModelViewInverse.2.0 * 1.0
variable.float.shadowmapLightDirY = shadowModelViewInverse.2.1 * 1.0
variable.float.shadowmapLightDirZ = shadowModelViewInverse.2.2 * 1.0
uniform.vec3.lightDir = vec3(shadowmapLightDirX, shadowmapLightDirY, shadowmapLightDirZ)
variable.float.shadowmapLightDirViewX = gbufferModelView.0.0 * shadowmapLightDirX + gbufferModelView.1.0 * shadowmapLightDirY + gbufferModelView.2.0 * shadowmapLightDirZ
variable.float.shadowmapLightDirViewY = gbufferModelView.0.1 * shadowmapLightDirX + gbufferModelView.1.1 * shadowmapLightDirY + gbufferModelView.2.1 * shadowmapLightDirZ
variable.float.shadowmapLightDirViewZ = gbufferModelView.0.2 * shadowmapLightDirX + gbufferModelView.1.2 * shadowmapLightDirY + gbufferModelView.2.2 * shadowmapLightDirZ
uniform.vec3.lightDirView = vec3(shadowmapLightDirViewX, shadowmapLightDirViewY, shadowmapLightDirViewZ)

variable.float.timeSunrise  = ((clamp(sunAngle, 0.97, 1.00) - 0.97) / 0.03) + (1.0 - (clamp(sunAngle, 0.01, 0.10) - 0.01) / 0.09)
variable.float.timeNoon_0   = ((clamp(sunAngle, 0.01, 0.10) - 0.01) / 0.09) - ((clamp(sunAngle, 0.40, 0.49) - 0.40) / 0.09)
variable.float.timeSunset   = ((clamp(sunAngle, 0.40, 0.49) - 0.40) / 0.09) - ((clamp(sunAngle, 0.50, 0.53) - 0.50) / 0.03)
variable.float.timeNight    = ((clamp(sunAngle, 0.50, 0.53) - 0.50) / 0.03) - ((clamp(sunAngle, 0.97, 1.00) - 0.97) / 0.03)
uniform.vec4.daytime        = vec4(timeSunrise, timeNoon_0, timeSunset, timeNight)

variable.float.sunY         = sunDirY * sunDirNorm
variable.float.lf1          = (1.0 - ((clamp(-sunY, 0.002, 0.04) - 0.002) / 0.038)) * (1.0 - ((clamp(sunY, 0.002, 0.04) - 0.002) / 0.038))
uniform.float.lightFlip     = clamp(1.0 - lf1, 0.0, 1.0)

variable.bool.isCloudSunlit     = (worldTime>23000 || worldTime<12900)
uniform.vec3.cloudLightDir      = vec3(if(isCloudSunlit, sunDirX, moonDirX)*sunDirNorm, if(isCloudSunlit, sunDirY, moonDirY)*sunDirNorm, if(isCloudSunlit, sunDirZ, moonDirZ)*sunDirNorm)
uniform.vec3.cloudLightDirView  = vec3(if(isCloudSunlit, svecX, mvecX), if(isCloudSunlit, svecY, mvecY), if(isCloudSunlit, svecZ, mvecZ))
variable.float.cloudBackscatterInt = ((clamp(worldTime, 12550.0, 12800.0) - 12550.0) / 250.0) - ((clamp(worldTime, 23250.0, 23600.0) - 23250.0) / 350.0)
variable.float.cloudLightFlip1 = ((clamp(worldTime, 22600.0, 22900.0) - 22600.0) / 300.0) - ((clamp(worldTime, 23000.00, 23200.0) - 23000.0) / 200.0)
variable.float.cloudLightFlip2 = ((clamp(worldTime, 12600.0, 12900.0) - 12600.0) / 300.0) - ((clamp(worldTime, 12900.00, 13200.0) - 12900.0) / 300.0)
uniform.float.cloudLightFlip   = clamp(1.0 - (cloudLightFlip1 + cloudLightFlip2), 0.0, 1.0)

#
#           DETAILED TIME DEPENDENT STUFF
#

variable.float.timeMorning      = ((clamp(worldTime, 22600.0, 23600.0) - 22600.0) / 1000.0)  + (1.0-((clamp(worldTime, 200.0, 1000.0) - 200.0) / 800.0))
variable.float.timeForenoon     = ((clamp(worldTime,   200.0,  1000.0) -   200.0) /  800.0)  - ((clamp(worldTime,  3500.0,  5500.0) -  3500.0) / 2000.0)
variable.float.timeNoon         = ((clamp(worldTime,  3500.0,  5500.0) -  3500.0) / 2000.0)  - ((clamp(worldTime,  6500.0,  8500.0) -  6500.0) / 2000.0)
variable.float.timeAfternoon    = ((clamp(worldTime,  6500.0,  8500.0) -  6500.0) / 2000.0)  - ((clamp(worldTime, 11000.0, 11800.0) - 11000.0) /  800.0)
variable.float.timeEvening      = ((clamp(worldTime, 11000.0, 11800.0) - 11000.0) /  800.0)  - ((clamp(worldTime, 13000.0, 13600.0) - 13000.0) /  600.0)
variable.float.timeDusk         = ((clamp(worldTime, 13000.0, 13600.0) - 13000.0) /  600.0)  - ((clamp(worldTime, 17000.0, 19000.0) - 17000.0) / 2000.0)
variable.float.timeDawn         = ((clamp(worldTime, 17000.0, 19000.0) - 17000.0) / 2000.0)  - ((clamp(worldTime, 22600.0, 23600.0) - 22600.0) / 1000.0)

variable.float.smoothWorldTime = smooth(sunDirZ, frameTime*8.0, frameTime*8.0)
uniform.int.WorldTimeChange = if(abs(smoothWorldTime - sunDirZ) > 0.9, 1, 0)

variable.float.RW_BIOME_Dry = if(biome_category == CAT_DESERT, 1.0, \
                                    biome_category == CAT_MESA, 0.8, \
                                    biome_category == CAT_SAVANNA, 0.6, \
                                    biome_category == CAT_ICY, 1.0, \
                                    0.0)
uniform.float.RW_BIOME_Dryness = clamp(smooth(72, RW_BIOME_Dry, 32.0, 32.0), 0.0, 1.0)

variable.float.MoonPhase_LightStrength = (abs(moonPhase - 4.0) / 4.0) + 0.2
variable.float.MoonPhase_Smoothed = smooth(MoonPhase_LightStrength, 10.0, 10.0)
uniform.float.RMoonPhaseOcclusion = MoonPhase_Smoothed

#
#           FOG DYNAMICS
#

variable.float.fogRayleigh  = 1.0 * timeMorning + 0.8 * timeForenoon + 0.7 * timeNoon + 0.66 * timeAfternoon + 0.59 * timeEvening + 0.36 * timeDusk + 0.45 * timeDawn + wetness
variable.float.fogMie       = 1.00 * timeMorning + 0.85 * timeForenoon + 0.73 * timeNoon + 0.64 * timeAfternoon + 0.60 * timeEvening + 0.57 * timeDusk + 0.65 * timeDawn + wetness * 2.5
variable.float.fogMist      = 1.0 * timeMorning + 0.06 * timeForenoon + timeDawn * 0.35 + wetness * 2.0

uniform.vec3.fogDensityCoeff = vec3(fogRayleigh, fogMie, fogMist)