clouds=off
sun=false

voxeliseLightBlocks=true
separateAo=true

#ifdef OLD_LIGHTING
oldLighting=true
#endif

iris.features.required=CUSTOM_IMAGES SSBO SEPARATE_HARDWARE_SAMPLERS BLOCK_EMISSION_ATTRIBUTE HIGHER_SHADOWCOLOR

image.sunTransmittanceLUT = sunTransmittanceLUTTex RGBA RGBA16F HALF_FLOAT false false 256 64
image.multipleScatteringLUT = multipleScatteringLUTTex RGBA RGBA16F HALF_FLOAT false false 32 32
image.skyViewLUT = skyViewLUTTex RGBA RGBA16F HALF_FLOAT false false 200 200
image.aerialPerspectiveLUT = aerialPerspectiveLUTTex RGBA RGBA16F HALF_FLOAT false false 32 32 32
image.debug = debugtex RGBA RGBA8 unsigned_byte true true 1.0 1.0

#ifdef FLOODFILL
shadow.culling = reversed
image.voxelMap = voxelMapTex RED_INTEGER R32UI UNSIGNED_INT true false 256 128 256
image.floodfillVoxelMap1 = floodfillVoxelMapTex1 RGBA RGBA16F FLOAT false false 256 128 256
image.floodfillVoxelMap2 = floodfillVoxelMapTex2 RGBA RGBA16F FLOAT false false 256 128 256
#endif

customTexture.perlinNoiseTex = /textures/perlinNoise.png
customTexture.blueNoiseTex = /textures/blueNoise.png
customTexture.tonyMcMapfaceTex = /textures/tonyMcMapface.bin TEXTURE_3D RGBA32F 48 48 48 RGBA FLOAT
customTexture.causticsTex = /textures/caustics.png

# sky and sunlight colours  2x  vec3    = 2x16  =  32
# rain frame time counter   1x  float   = 1x 4  =   4
# hand voxel data           1x  uint    = 1x 4  =   4
bufferObject.0 = 40
# sun visibility smoothed over time (float)
bufferObject.1 = 4
# scene brightness smoothed over time (float)
bufferObject.2 = 4

blend.gbuffers_textured_lit.colortex1=off
blend.gbuffers_hand.colortex1=off
blend.dh_water.colortex1=off
blend.dh_terrain.colortex1=off

blend.gbuffers_textured_lit.colortex4=ONE_MINUS_SRC_ALPHA SRC_ALPHA ONE ONE_MINUS_SRC_ALPHA
blend.dh_terrain.colortex4=ONE_MINUS_SRC_ALPHA SRC_ALPHA ONE ONE_MINUS_SRC_ALPHA
blend.dh_water.colortex4=ONE_MINUS_SRC_ALPHA SRC_ALPHA ONE ONE_MINUS_SRC_ALPHA

blend.gbuffers_weather.colortex5 = ONE ONE ONE ONE
blend.gbuffers_line.colortex5 = ONE ONE ONE ONE
blend.gbuffers_textured_lit.colortex5=off

sliders = shadowDistance shadowMapResolution SHADOW_SAMPLES sunPathRotation BLOOM_RADIUS BLOOM_STRENGTH REFLECTION_MODE SSR_STEPS SHADOW_SOFTNESS EXPOSURE CONTRAST SATURATION DH_AO_SAMPLES PARALLAX_HEIGHT PARALLAX_DISTANCE PARALLAX_SAMPLES PARALLAX_SHADOW_SAMPLES SEA_LEVEL GODRAYS AMBIENT_STRENGTH GODRAYS_SAMPLES BASE_FOG_DENSITY MORNING_FOG_DENSITY PIXEL_SIZE RAIN_PUDDLES EMISSION_STRENGTH ambientOcclusionLevel entityShadowDistanceMul BLOCKLIGHT_STRENGTH tonemap CLOUD_COVERAGE CLOUD_DENSITY WATER_ABSORPTION_MOD WATER_SCATTERING_MOD WAVE_DEPTH BLOCK_OUTLINE_R BLOCK_OUTLINE_G BLOCK_OUTLINE_B

profile.potato = !SHADOWS REFLECTION_MODE:1 !CLOUDS  !TEMPORAL_FILTER !CLOUDY_FOG !CAUSTICS !DH_AO GODRAYS:0 !FLOODFILL !WATER_PARALLAX
profile.toaster = !SHADOWS REFLECTION_MODE:1 CLOUDS BLOOM  !TEMPORAL_FILTER CLOUDY_FOG !CAUSTICS !DH_AO GODRAYS:1 !FLOODFILL !WATER_PARALLAX
profile.igpu = SHADOWS REFLECTION_MODE:2 CLOUDS BLOOM TEMPORAL_FILTER CLOUDY_FOG !CAUSTICS SSR_STEPS:4 shadowMapResolution:512 shadowDistance:64.0 SHADOW_SAMPLES:4 DH_AO DH_AO_SAMPLES:32 GODRAYS:1 !FLOODFILL !WATER_PARALLAX
profile.dgpu = SHADOWS REFLECTION_MODE:2 CLOUDS BLOOM  TEMPORAL_FILTER CLOUDY_FOG CAUSTICS SSR_STEPS:8 shadowMapResolution:2048 shadowDistance:160.0 SHADOW_SAMPLES:8 DH_AO DH_AO_SAMPLES:64 GODRAYS:2 FLOODFILL WATER_PARALLAX

screen=GLIMMER_SHADERS WEBSITE <profile> PBR_MODE <empty> <empty>  [LIGHTING] [ATMOSPHERICS] [WATER] [POST] [WORLD] [MATERIALS] [DH] [MISC] <empty> <empty> <empty> [DEBUG]

    screen.LIGHTING =  [SHADOWS] FLOODFILL DIRECTIONAL_LIGHTMAPS DYNAMIC_HANDLIGHT AMBIENT_STRENGTH EMISSION_STRENGTH BLOCKLIGHT_STRENGTH ambientOcclusionLevel

    screen.SHADOWS = SHADOWS shadowDistance shadowMapResolution SHADOW_SAMPLES SHADOW_SOFTNESS sunPathRotation entityShadowDistanceMul

    screen.ATMOSPHERICS = CLOUDS BLOCKY_CLOUDS CLOUD_SHADOWS <empty> <empty> <empty> ATMOSPHERIC_FOG CLOUDY_FOG BASE_FOG_DENSITY MORNING_FOG_DENSITY GODRAYS GODRAYS_SAMPLES <empty> <empty> CAVE_SKY_DARKENING

    screen.WATER = REFLECTION_MODE SSR_STEPS FADE_REFLECTIONS SSR_JITTER REFRACTION CAUSTICS WATER_SCATTERING_MOD WATER_ABSORPTION_MOD WAVE_DEPTH WATER_PARALLAX

    screen.POST = EXPOSURE AUTO_EXPOSURE BLOOM TEMPORAL_FILTER tonemap BLOOM_RADIUS BLOOM_STRENGTH CONTRAST SATURATION FXAA MOTION_BLUR

    screen.WORLD = WAVING_BLOCKS INFINITE_OCEAN SEA_LEVEL PATCHY_LAVA PIXEL_LOCKED_LIGHTING PIXEL_SIZE

    screen.MATERIALS = PBR_MODE [PARALLAX] ROUGH_SKY_REFLECTIONS RAIN_PUDDLES

        screen.PARALLAX = PARALLAX PARALLAX_DISTANCE PARALLAX_HEIGHT PARALLAX_SAMPLES PARALLAX_SHADOW PARALLAX_SHADOW_SAMPLES PARALLAX_DISTANCE

    screen.DH = DH_AO DH_AO_SAMPLES

    screen.MISC = [BLOCK_OUTLINE]

      screen.BLOCK_OUTLINE = <empty> BLOCK_OUTLINE_MODE <empty> BLOCK_OUTLINE_R BLOCK_OUTLINE_G BLOCK_OUTLINE_B
      screen.BLOCK_OUTLINE.columns = 3

    screen.DEBUG = DEBUG_ENABLE FREEZE_TIME <empty> <empty>  VANILLA_WATER OLD_LIGHTING ANIME_CLOUDS CLOUD_COVERAGE BIOME_CLOUDS CLOUD_DENSITY

program.world0/prepare1.enabled=ROUGH_SKY_REFLECTIONS
program.world0/prepare3.enabled=ATMOSPHERIC_FOG

program.world0/shadowcomp.enabled=FLOODFILL

program.world0/deferred1.enabled=DH_AO

#if GODRAYS == 0
program.world0/composite2.enabled=PROGRAM_DISABLED
#endif

#if !(defined DISTANT_HORIZONS || defined VOXY)
program.world0/composite.enabled=PROGRAM_DISABLED
#endif

program.world0/composite49.enabled=AUTO_EXPOSURE
program.world0/composite51.enabled=MOTION_BLUR

program.world0/composite80.enabled=BLOOM
program.world0/composite81.enabled=BLOOM
program.world0/composite82.enabled=BLOOM
program.world0/composite83.enabled=BLOOM
program.world0/composite84.enabled=BLOOM
program.world0/composite85.enabled=BLOOM
program.world0/composite86.enabled=BLOOM
program.world0/composite87.enabled=BLOOM
program.world0/composite88.enabled=BLOOM

program.world0/composite89.enabled=TEMPORAL_FILTER

program.world1/prepare1.enabled=PROGRAM_DISABLED

program.world1/shadowcomp.enabled=FLOODFILL

program.world1/deferred1.enabled=DH_AO

#if !(defined DISTANT_HORIZONS || defined VOXY)
program.world1/composite.enabled=PROGRAM_DISABLED
#endif

program.world1/composite49.enabled=AUTO_EXPOSURE
program.world1/composite51.enabled=MOTION_BLUR

program.world1/composite80.enabled=BLOOM
program.world1/composite81.enabled=BLOOM
program.world1/composite82.enabled=BLOOM
program.world1/composite83.enabled=BLOOM
program.world1/composite84.enabled=BLOOM
program.world1/composite85.enabled=BLOOM
program.world1/composite86.enabled=BLOOM
program.world1/composite87.enabled=BLOOM
program.world1/composite88.enabled=BLOOM

program.world1/composite89.enabled=TEMPORAL_FILTER


program.world-1/prepare1.enabled=ROUGH_SKY_REFLECTIONS

program.world-1/shadowcomp.enabled=FLOODFILL

program.world-1/deferred1.enabled=DH_AO

program.world-1/composite49.enabled=AUTO_EXPOSURE
program.world-1/composite51.enabled=MOTION_BLUR

#if !(defined DISTANT_HORIZONS || defined VOXY)
program.world-1/composite.enabled=PROGRAM_DISABLED
#endif

program.world-1/composite80.enabled=BLOOM
program.world-1/composite81.enabled=BLOOM
program.world-1/composite82.enabled=BLOOM
program.world-1/composite83.enabled=BLOOM
program.world-1/composite84.enabled=BLOOM
program.world-1/composite85.enabled=BLOOM
program.world-1/composite86.enabled=BLOOM
program.world-1/composite87.enabled=BLOOM
program.world-1/composite88.enabled=BLOOM

program.world-1/composite89.enabled=TEMPORAL_FILTER

blend.composite85 = ONE ONE ONE ZERO
blend.composite86 = ONE ONE ONE ZERO
blend.composite87 = ONE ONE ONE ZERO
blend.composite88 = ONE ONE ONE ZERO

size.buffer.colortex7 = 512 512

uniform.float.humiditySmooth=smooth(rainfall, 50,50)
uniform.float.biomeCanRainSmooth=smooth(if(biome_precipitation == 1, 1.0, 0.0), 50,50)
uniform.float.biomeCanSnowSmooth=smooth(if(biome_precipitation == 2, 1.0, 0.0), 50,50)
uniform.float.biomeCanPrecipitateSmooth=smooth(if(biome_precipitation > 0, 1.0, 0.0), 50,50)

#if defined DISTANT_HORIZONS || defined VOXY
# COMBINED PROJECTION MATRIX BY SIXTHSURGE
# references:
# https://shaderlabs.org/wiki/Shader_Tricks#Constructing_perspective_projection_matrices
# https://www.symbolab.com/solver/matrix-inverse-calculator/inverse%5Cbegin%7Bpmatrix%7D%5Cfrac%7Bcot%5Cleft(%5Cfrac%7B%5Ctheta%7D%7B2%7D%5Cright)%7D%7Ba%7D%260%260%260%5C%5C%20%20%200%26cot%5Cleft(%5Cfrac%7B%5Ctheta%7D%7B2%7D%5Cright)%260%260%5C%5C%20%20%200%260%26-%5Cfrac%7BZ_%7Bf%7D%2BZ_%7Bn%7D%7D%7BZ_%7Bf%7D-Z_%7Bn%7D%7D%26-%20%5Cfrac%7B2%20Z_%7Bf%7D%20Z_%7Bn%7D%7D%7BZ_%7Bf%7D%20-%20Z_%7Bn%7D%7D%5C%5C%20%20%200%260%26-1%260%5Cend%7Bpmatrix%7D?or=input

variable.float.fov = 2.0 * atan(1.0 / (gbufferProjection.0.0 * aspectRatio))

uniform.float.combinedNear = 0.05
#ifdef DISTANT_HORIZONS
uniform.float.combinedFar = dhRenderDistance
#endif
#ifdef VOXY
uniform.float.combinedFar = vxRenderDistance
#endif

uniform.vec4.combinedProjection0 = vec4(1.0 / (tan(fov / 2.0) * aspectRatio), 0.0, 0.0, 0.0)
uniform.vec4.combinedProjection1 = vec4(0.0, 1.0 / tan(fov / 2), 0.0, 0.0)
uniform.vec4.combinedProjection2 = vec4(0.0, 0.0, (combinedFar + combinedNear) / (combinedNear - combinedFar), -1.0)
uniform.vec4.combinedProjection3 = vec4(0.0, 0.0, (2.0 * combinedFar * combinedNear) / (combinedNear - combinedFar), 0.0)

uniform.vec4.combinedProjectionInverse0 = vec4(aspectRatio * tan(fov / 2.0), 0.0, 0.0, 0.0)
uniform.vec4.combinedProjectionInverse1 = vec4(0.0, tan(fov / 2.0), 0.0, 0.0)
uniform.vec4.combinedProjectionInverse2 = vec4(0.0, 0.0, 0.0, -(combinedFar - combinedNear) / (2.0 * combinedFar * combinedNear))
uniform.vec4.combinedProjectionInverse3 = vec4(0.0, 0.0, -1.0, (combinedFar + combinedNear) / (2.0 * combinedFar * combinedNear))
#endif
