# Krpmon Shader

# Info and Color Scheme Definitions
INFO.0=Krpmon Shader
INFO.1=Customized by Krypto

THEME.0=Default
THEME.1=Neon Cyberpunk
THEME.2=Deep Dark

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

#if ENTITY_SHADOWS == 0
shadowEntities=false
#endif

#if BLOCK_ENTITY_SHADOWS == 0
shadowBlockEntities=false
#endif

#ifdef ROUND_SUN
sun=off
moon=off
#endif

#if CLOUD_STYLE != 0
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
texture.deferred.colortex6=/lib/worley_noise.dat TEXTURE_3D R8 256 32 256 RED UNSIGNED_BYTE

# 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=CHROMATIC_ABERRATION
program.world-1/composite12.enabled=CHROMATIC_ABERRATION
program.world0/composite12.enabled=CHROMATIC_ABERRATION

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

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

# Options config
INFO=0
THEME=0
COLOR_SCHEME=1
PBR_INFORMATION=0

screen=<profile> INFO DYNAMIC_SHADOWS COLOR_SCHEME THEME <empty> [TERRAIN] [COLORS] [FOG] [SKY] [WATER] [DH_SETTINGS] [CAMERA] [POST] [PBR] [DEBUG]
screen.FOG=BORDER_FOG BORDER_FOG_STRENGTH ATMOSPHERIC_FOG ATM_FOG_STRENGTH GODRAYS GODRAYS_QUALITY UNDERWATER_FOG_STRENGTH
screen.POST=TONEMAP_OPERATOR [COLOR_GRADING] <empty> <empty> BLOOM [BLOOM_SETTINGS] <empty> <empty> [ANTI_ALIASING] <empty> SSAO SSAO_STRENGTH SSAO_SCALE
screen.TERRAIN=DYNAMIC_SHADOWS [SHADOW_SETTINGS] 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 SEASONS [SEASONS_SETTINGS]
screen.SHADOW_SETTINGS=SHADOW_FILTER PCF_STRENGTH <empty> <empty> shadowMapResolution shadowDistance <empty> <empty> ENTITY_SHADOWS BLOCK_ENTITY_SHADOWS entityShadowDistanceMul
screen.SEASONS_SETTINGS=SEASONS_TEMPERATE_BIOME_CHECK <empty> <empty> SPRING_HUE SPRING_SAT SPRING_VAL SUMMER_HUE SUMMER_SAT SUMMER_VAL AUTUMN_HUE AUTUMN_SAT AUTUMN_VAL WINTER_HUE WINTER_SAT WINTER_VAL
screen.SEASONS_SETTINGS.columns=3
screen.SKY=CLOUD_STYLE [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] CHROMATIC_ABERRATION CA_STRENGTH OUTLINE [OUTLINE_SETTINGS]
screen.OUTLINE_SETTINGS=OUTLINE_THICKNESS OUTLINE_THRESHOLD OUTLINE_BRIGHTNESS
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> CHANNEL_MIXER [CHANNEL_MIXER_SETTINGS] COLOR_BALANCING [COLOR_BALANCING_SETTINGS]
screen.CHANNEL_MIXER_SETTINGS=CM_R_IN_R CM_G_IN_R CM_B_IN_R CM_R_IN_G CM_G_IN_G CM_B_IN_G CM_R_IN_B CM_G_IN_B CM_B_IN_B
screen.CHANNEL_MIXER_SETTINGS.columns=3
screen.COLOR_BALANCING_SETTINGS=SHADOWS_CYAN_TO_RED SHADOWS_MAGENTA_TO_GREEN SHADOWS_YELLOW_TO_BLUE MIDS_CYAN_TO_RED MIDS_MAGENTA_TO_GREEN MIDS_YELLOW_TO_BLUE HIGHS_CYAN_TO_RED HIGHS_MAGENTA_TO_GREEN HIGHS_YELLOW_TO_BLUE
screen.COLOR_BALANCING_SETTINGS.columns=3
screen.DH_SETTINGS=DH_NOISE DH_NOISE_SIZE DH_CUTOFF SSAO_ON_LODS
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.PBR=PBR_SSS_STRENGTH <empty> <empty> <empty> PBR_INFORMATION <empty> PBR_NORMAL PBR_SPECULAR
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 shadowMapResolution shadowDistance entityShadowDistanceMul BORDER_FOG_STRENGTH UNDERWATER_FOG_STRENGTH CA_STRENGTH CM_R_IN_R CM_G_IN_R CM_B_IN_R CM_R_IN_G CM_G_IN_G CM_B_IN_G CM_R_IN_B CM_G_IN_B CM_B_IN_B SHADOWS_CYAN_TO_RED SHADOWS_MAGENTA_TO_GREEN SHADOWS_YELLOW_TO_BLUE MIDS_CYAN_TO_RED MIDS_MAGENTA_TO_GREEN MIDS_YELLOW_TO_BLUE HIGHS_CYAN_TO_RED HIGHS_MAGENTA_TO_GREEN HIGHS_YELLOW_TO_BLUE PBR_SSS_STRENGTH SPRING_HUE SPRING_SAT SPRING_VAL SUMMER_HUE SUMMER_SAT SUMMER_VAL AUTUMN_HUE AUTUMN_SAT AUTUMN_VAL WINTER_HUE WINTER_SAT WINTER_VAL OUTLINE_BRIGHTNESS OUTLINE_THICKNESS OUTLINE_THRESHOLD PCF_STRENGTH
# 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
#elif TAA_MODE > 2
variable.float.jitterX=frac(0.5 + frameCounter / gr) * 2 - 1
variable.float.jitterY=frac(0.5 + frameCounter / (gr*gr)) * 2 - 1
#else
variable.float.jitterX=0.0
variable.float.jitterY=0.0
#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)

#if MC_VERSION < 12104
uniform.float.fogAmount=(0.5 + sunriseStrength + smooth(temperature, 10, 10) + rainStrength) * isOutdoorsSmooth
#else
uniform.float.fogAmount=(0.5 + sunriseStrength + nightStrength + smooth(if(biome == BIOME_PALE_GARDEN && nightStrength > 0.99, 50, temperature), 10, 10) + rainStrength) * isOutdoorsSmooth
#endif

alphaTest.gbuffers_skybasic=false
alphaTest.gbuffers_skytextured=false
alphaTest.gbuffers_clouds=GREATER 0.005
alphaTest.gbuffers_water=false
dhShadow.enabled=false

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

COLOR_SCHEME.1=Krpmon Default
COLOR_SCHEME.2=Vanilla
COLOR_SCHEME.3=Choc v7
COLOR_SCHEME.4=Visually Vibrant
COLOR_SCHEME.5=Winter

# PBR Info
PBR_INFORMATION.0=PBR Info