## Global environment settings

######## Light ########
# Sun
sun_color = { 1.02 0.98 0.96 }
sun_intensity = 5.0
sun_direction = { -0.5 0.55 0.9 }	#	+Right/-Left	Height  -Front/+Back

# Offset overrides
shadow_direction_offset = { -0.48 0.0 -1.45 }
#shadow_direction_offset = { 0.0 0.0 0.0 }
water_sun_direction_offset = { 0.0 0.0 0.0 }

# Shadow sharpness
shadowmap_kernelscale = 1.0

# Cubemap
cubemap_intensity = 2.5
cubemap = "gfx/map/environment/cubemap_blackbottom.dds"
cubemap_y_rotation = 260

######## Postprocessing ########
# Color settings	(Keep neutral, use posteffect volumes instead)
hue_offset = 0.0				# Hue
saturation_scale = 1.0 			# Saturation
value_scale = 1.0				# Brightness value
colorbalance = { 1.0 1.0 1.0 }	# Color control
levels_min = hsv{ 0.0 0.0 0.0 }	# Can be used for color/value control (levels)
levels_max = hsv{ 0.0 0.0 1.0 }	# Can be used for color/value control (levels)

# Tonemap reference (Choose one)
#tonemap_function = "Reinhard"
#tonemap_function = "Filmic_Hable"			# Old Hable filmic formula
#tonemap_function = "FilmicACES_Narkowicz"	# Seems to have the most fitting balance
#tonemap_function = "FilmicACES_Hill"		# Similar to Narkowicz, whites are less saturated and brighter
tonemap_function = "Uncharted"				# Custom tonemap, Uses curve variables below
tonemap_curve = {
	shoulder_strength = 0.318
	linear_strength = 0.145
	linear_angle = 0.148
	toe_strength = 0.423
	toe_numerator = 0.025
	toe_denominator = 0.288
	linear_white = 4.20
}

exposure_function = "FixedExposure"
exposure = 1.0						# Only used with fixed exposure

# Fog
fog_color = { 0.75 0.75 0.75 }		# (Overwritten by post posteffect_volumes.txt)
fog_begin = 0.0						# (Overwritten by post posteffect_volumes.txt)
fog_end = 0.0						# (Overwritten by post posteffect_volumes.txt)
fog_max = 0.0						# (Overwritten by post posteffect_volumes.txt)


######## Tree ########
tree_sway_loop_speed = 0.75
tree_sway_wind_strength_spatial_modifier = -0.125
tree_sway_speed  = 0.8
tree_sway_wind_cluster_size_modifier = -0.25
tree_height_impact_on_sway  = 0.50
tree_sway_scale  = 1.5
tree_sway_world_direction = { -1 0 -1 }


######## Graphics ########
# Bloom
bloom_strength = 0.113
bloom_steepness = 1.49
bloom_threshold = 0.15

# Map global SSAO settings
ssao = {
	enabled = yes

	# Settings
	samples = 4 #8					# Sample iterations
	radius = 0.11				# Radius for sample point, less means tighter samples and crisper edges
	max_radius = 1.0			# Culling distance
	depth_distance = 0.01		# Depth distance for sample point
	max_depth = 0.8				# Culling distance, should be based on scale of the world

	apply_scale = 1.00			# Shifts the final results towards less overall occlusion
	apply_bias = 0.63			# Bias to adjust occlusion errors on final result
	apply_power = 50.0			# Strength/Hardness of the occlusion
	blend_factor = 0.9			# Final Blend amount (practically opacity)

	# Blur
	blur_enabled = yes
	blur_width = 5.0			# Blur of the noise
	blur_scale = 1.0			# Does nothing when above 0
	blur_depth_power = 1.0		# Results as a sharpening of occluders edgs
}

# Map global Depth of field settings
# WARNING - Can impact performance
depthoffield = {
	enabled = yes
	dof_samplecount = 8 #16 		# Can have large performance impact
	dof_baseradius = 0.1 		# Blur radius
	dof_blurblendmin = 0.1		# Blur blend, used to blend between the downsampled dof image and the focused full resolution image
	dof_blurblendmax = 2.0		# Blur blend, used to blend between the downsampled dof image and the focused full resolution image

	# Camera based settings - no performance impact
	dof_blurmin = 1.0
	dof_blurmax = 50.0
	dof_blurscale = 2.5
	dof_blurexponent = 1.0
	dof_heightmin = 0.0
	dof_heightmax = 1000.0
}
