#ifndef PSXA_SETTINGS_GLSL
#define PSXA_SETTINGS_GLSL

#define VERTEX_SNAPPING
#define SNAP_PIXEL_SIZE 4.0 // [2.0 3.0 4.0 5.0 6.0 8.0]
#define DISTANT_SNAP_PIXEL_SIZE 1.0 // [1.0 1.5 2.0 2.5 3.0 4.0]
#define ENTITY_VERTEX_SNAPPING
#define AFFINE_TEXTURE_MAPPING
#define AFFINE_TEXTURE_STRENGTH 0.2 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
//#define SEAM_REPAIR

#define DITHERING
#define COLOR_LEVELS 16 // [16 24 32 48 64]
#define DITHER_STRENGTH 1.25 // [0.25 0.5 0.75 1.0 1.25 1.5 2.0 3.0]
#define DITHER_PATTERN_SCALE 1 // [1 2 3 4]

#define PSX_ENCHANT_GLINT
#define GLINT_STRENGTH 0.75 // [0.15 0.25 0.35 0.45 0.60 0.75 0.90 1.1]
#define GLINT_PIXEL_SIZE 6 // [2 3 4 6 8 12]
#define COPLANAR_STABILITY
#define COPLANAR_BIAS_STRENGTH 2.0 // [0.5 0.75 1.0 1.25 1.5 2.0]

#define FOLIAGE_WIND
#define WIND_STRENGTH 0.6 // [0.0 0.25 0.4 0.6 0.8 1.0]
#define WIND_SPEED 2.0 // [0.5 1.0 1.5 2.0 2.5 3.0]
#define STAINED_GLASS_TINT_STRENGTH 0.50 // [0.20 0.30 0.38 0.50 0.65 0.80 1.0]

#define SHADOWS
//#define SHADOW_FILTER
#define SHADOW_FILTER_SAMPLES 4 // [2 4]
#define SHADOW_CULLING_MODE 0 // [0 1]
#define SECONDARY_SHADOW_CASTERS 1 // [0 1]
const int shadowMapResolution = 2048; // [512 1024 2048 4096]
const float shadowDistance = 96.0; // [48.0 64.0 80.0 96.0 128.0 160.0]
// Iris otherwise linearly interpolates stored depths even when our optional
// multi-tap filter is disabled. Nearest sampling preserves the square shadow
// texels and prevents curved comparison contours around blocky silhouettes.
const bool shadowtex0Nearest = true;
#define SHADOW_DARKNESS 0.18 // [0.0 0.10 0.18 0.25 0.35 0.50]

#define LIGHTING_STRENGTH 1.0 // [0.6 0.8 1.0 1.2 1.4]
#define BLOCKLIGHT_STRENGTH 1.0 // [0.6 0.8 1.0 1.2 1.4]
#define NIGHT_BRIGHTNESS 0.65 // [0.35 0.45 0.55 0.65 0.75 0.85]

#define DISTANCE_FOG
#define FOG_START 0.72 // [0.60 0.68 0.72 0.75 0.78 0.82 0.86 0.90]

#define ATMOSPHERIC_HAZE
#define ATMOSPHERE_QUALITY 1 // [0 1]
#define DAY_HAZE_STRENGTH 0.40 // [0.0 0.20 0.30 0.40 0.50 0.65 0.80 1.0]
#define NIGHT_HAZE_STRENGTH 0.75 // [0.0 0.30 0.50 0.65 0.75 0.90 1.0 1.2]

#define PSX_UNDERWATER
#define UNDERWATER_VISIBILITY 32.0 // [12.0 16.0 20.0 24.0 32.0 40.0 48.0]
#define UNDERWATER_GRADE_STRENGTH 0.85 // [0.0 0.25 0.5 0.7 0.85 1.0]
#define UNDERWATER_REFRACTION
#define UNDERWATER_REFRACTION_PIXELS 1.0 // [0.0 0.5 1.0 1.5 2.0]
#define UNDERWATER_CAUSTICS
#define UNDERWATER_CAUSTIC_STRENGTH 0.25 // [0.0 0.08 0.12 0.18 0.25 0.35]
#define UNDERWATER_SHAFT_STRENGTH 0.12 // [0.0 0.05 0.08 0.12 0.18 0.25]

#define SURFACE_WATER_DEPTH
#define WATER_DEPTH_STRENGTH 0.65 // [0.0 0.2 0.35 0.5 0.65 0.8 1.0]

//#define VANILLA_CLOUDS
#define CLOUD_OPACITY 0.78 // [0.50 0.60 0.70 0.78 0.85 0.92]

#define GODRAYS
#define GODRAY_MODE 1 // [0 1]
#define GODRAY_SAMPLES 16 // [4 6 8 10 12 16 20]
#define GODRAY_STRENGTH 0.7 // [0.15 0.25 0.35 0.45 0.55 0.7 0.9]
#define MOON_SHAFTS
#define MOON_SHAFT_STRENGTH 0.35 // [0.0 0.1 0.15 0.2 0.25 0.35 0.45 0.55]

#define CUSTOM_NIGHT_SKY
#define STAR_DENSITY 0.985 // [0.992 0.988 0.985 0.980 0.972]
#define STAR_BRIGHTNESS 0.75 // [0.35 0.5 0.75 1.0 1.25]
#define GALAXY_STRENGTH 0.2 // [0.2 0.35 0.55 0.75 1.0]

#define BIOME_GRADING
#define BIOME_GRADE_STRENGTH 0.75 // [0.0 0.25 0.5 0.75 1.0]

#define LIGHTNING_EFFECTS
#define LIGHTNING_FLASH_STRENGTH 0.45 // [0.0 0.25 0.35 0.45 0.55 0.7]

#define EMISSIVE_BLOCKS
#define EMISSIVE_STRENGTH 0.35 // [0.0 0.15 0.25 0.35 0.5 0.75]

#define COLORED_LIGHTING_MODE 1 // [0 1]
#define COLORED_LIGHT_STRENGTH 1.0 // [0.0 0.35 0.5 0.75 1.0 1.25]
#define VOXEL_LIGHT_RADIUS 8 // [4 5 6 7 8]
#define FAR_VOXEL_LIGHT_RADIUS 3

// Cinematic is the fresh-install default. Its floating-point scene pipeline,
// GTAO and bloom retain the original ModernPSX display curve and never derive
// roughness or specular strength from rainStrength. The experimental soft
// shadows and volumetric clouds remain optional and disabled.
#define CINEMATIC_RENDERING
//#define CINEMATIC_SOFT_SHADOWS
#define CINEMATIC_SHADOW_SEARCH_SAMPLES 8 // [4 6 8 12]
#define CINEMATIC_SHADOW_FILTER_SAMPLES 12 // [6 8 12 16]
#define CINEMATIC_SUN_ANGULAR_RADIUS 0.018 // [0.008 0.012 0.018 0.026 0.036]
#define CINEMATIC_GTAO
#define CINEMATIC_GTAO_DIRECTIONS 8 // [4 6 8]
#define CINEMATIC_GTAO_STEPS 4 // [2 3 4]
#define CINEMATIC_GTAO_RADIUS 2.5 // [1.0 1.5 2.0 2.5 3.5 5.0]
#define CINEMATIC_GTAO_STRENGTH 0.72 // [0.25 0.4 0.55 0.72 0.9 1.0]
#define CINEMATIC_BLOOM
#define CINEMATIC_BLOOM_STRENGTH 0.16 // [0.05 0.08 0.12 0.16 0.22 0.3]
#define CINEMATIC_BLOOM_THRESHOLD 1.05 // [0.7 0.85 1.0 1.05 1.2 1.5]
//#define CINEMATIC_CLOUDS
#define CINEMATIC_CLOUD_STEPS 20 // [12 16 20 24 32]
#define CINEMATIC_CLOUD_LIGHT_STEPS 4 // [2 3 4 6]
#define CINEMATIC_CLOUD_TEMPORAL_WEIGHT 0.88 // [0.0 0.65 0.78 0.88 0.94]
#define CINEMATIC_CLOUD_COVERAGE 0.72 // [0.3 0.4 0.52 0.62 0.72]

#endif
