# ============================================================================
#  APOCALYPSE -- the sky over MESA.  Edit, alt-tab, press F5.
# ============================================================================
#
#  Change a number, switch to the game, hit F5. The sky changes on the spot --
#  no rebuild, no restart, without even leaving the match. That is the whole
#  point of this file: choosing a colour is a loop of change-it-and-look-at-it,
#  and nobody should have to run a compiler inside that loop.
#
#  EVERY LINE BELOW IS COMMENTED OUT, and the value shown is what the game
#  already uses. Delete the '#' to take one over. Comment it back out, press
#  F5, and it goes back to the built-in value -- so you can always get back to
#  where you started, and this file only ever holds the handful of things you
#  are actually changing.
#
#  If you change something and nothing happens, look at the console: a key it
#  does not recognise, or a value it cannot read, is printed rather than
#  silently ignored. A bad value leaves the old one alone instead of turning
#  something black.
#
#  ---------------------------------------------------------------------------
#  A COLOUR IS THREE NUMBERS: red green blue. Commas optional.
#
#  They are LINEAR, and they are NOT capped at 1. Two things follow, and both
#  will surprise you:
#
#    1. Everything comes out LIGHTER than the number looks. The screen wants
#       sRGB and these are linear, so 0.5 lands at about three-quarters
#       brightness, not half. If a colour looks washed out, the number is
#       probably twice what you want. 0.2 is already a solid mid-grey.
#    2. You can go above 1.0. Nothing clamps until the very end, so 2.0 on the
#       sun is a perfectly good way to make it glare.
#
#  Hue is the RATIO between the three, not their size. Scaling all three
#  changes brightness; holding red and dropping green and blue makes it
#  oranger.
# ============================================================================


# ---------------------------------------------------------------- THE DOME
#  Three bands from the ground up: horizon -> middle -> zenith, with the two
#  falloffs deciding where each gives way to the next.
#
#  Keeping red in the zenith is what makes this an apocalypse rather than a
#  sunset. A neutral top over an orange bottom just reads as a nice evening.

# horizon         = 0.78  0.255 0.055
# middle          = 0.46  0.145 0.045
# zenith          = 0.155 0.058 0.042

#  Higher = the hot band is tighter and lower, leaving more of the sky the
#  middle colour. Lower = the orange climbs and takes over the dome.
# horizon_falloff = 4.2
#  The same, for middle giving way to zenith over the rest of the way up.
# zenith_falloff  = 2.1


# ----------------------------------------------------------------- THE SUN
#  Square, because everything in this game is. WHERE it sits is not set here:
#  the server rolls it per match and tells everyone, so that you and the people
#  you are shooting at are standing under the same sun.

#  Angular half-width in degrees. 3.2 is about eight times the real sun, which
#  is what it takes to read as a shape rather than a dot.
# sun_size_degrees  = 3.2
# sun_color         = 0.95 0.42 0.12
#  Edge softness as a fraction of the size. 0 is a perfectly crisp square.
sun_edge          = 0.24

#  The haze around it: much wider, much dimmer, added on top of the sky rather
#  than replacing it. This is most of what sells "dusty".
# sun_glow_color    = 0.95 0.38 0.11
# sun_glow_degrees  = 42.0
# sun_glow_strength = 0.44


# -------------------------------------------------------------- THE CLOUDS
#  A field of boxes -- one cell wide, one cell deep, cloud_thickness tall. You
#  are looking at either the flat bottom of a box or one of its four vertical
#  sides, and the difference between those two is what makes them look solid
#  instead of painted on.

#  'off' removes the layer entirely.
# clouds = on

#  The body colour, unlit. Keep the three numbers close together and let the
#  sunlight settings below do the colouring -- a cloud that is orange in its
#  own right stops reading as grey weather.
# cloud_color     = 0.170 0.158 0.153
#  What a face takes when the sun is on it. Push this towards the sky's own
#  colour and the clouds start disappearing into it, which is worth knowing if
#  you want them subtle rather than absent.
# cloud_sun_color = 0.58  0.27  0.10

#  SHAPE. Two scales, and it is the ratio between them that matters.
#
#    cloud_cell_metres -- the size of one square as it passes overhead
#    cloud_bank_metres -- how far you travel before the weather changes
#
#  Big cells in big banks = a few huge masses with chunky coastlines. Small
#  cells in big banks = smoother-edged blobs. Cells anywhere near the bank size
#  = confetti, which is the thing to avoid.
# cloud_cell_metres = 62.0
# cloud_bank_metres = 540.0

#  Roughly what fraction of the sky ends up grey, 0..1.
# cloud_coverage    = 0.25
#  How decisive the weather is: higher gives definite banks with definite gaps,
#  lower gives a vague wash. It also stretches what cloud_coverage does, so if
#  coverage stops responding, this is why.
# cloud_contrast    = 1.7

#  Where the layer sits and how deep it is, in metres. Thickness is what a ray
#  can enter through the side of, so it decides how three-dimensional they
#  look. 0 is a flat sheet.
# cloud_altitude    = 300.0
# cloud_thickness   = 100.0

#  Metres per second, as x y z. Slow: something you notice having moved, not
#  something you watch moving. The y number does nothing.
# cloud_drift       = 5.0 0.0 2.0

#  How high above the horizon they fade in. Raising it clears more sky low
#  down; taking it much below 0.2 starts showing the far edge of the layer,
#  because there is a limit to how far the game will trace through it at a
#  shallow angle.
# cloud_horizon_fade = 0.22

#  LIGHT ON THEM.
#
#  These two are the depth cue, so widen the gap if the clouds look flat and
#  narrow it if they look like cardboard. Both are gentler than you would
#  expect, because they are not rim effects -- looking anywhere except straight
#  up, most of what is on screen is a side face, not an underside.
# cloud_underside   = 0.75
# cloud_side_lift   = 1.15

#  How strongly a lit face takes cloud_sun_color. The master warmth knob.
# cloud_sun_light   = 0.45
#  How far a low sun reaches in underneath the layer. 0 leaves cloud bellies
#  dark at every hour; higher lights them from below at sunset, which is the
#  good bit.
# cloud_under_light = 0.55
#  How much lighter the middle of a bank is than its ragged rim.
# cloud_depth       = 0.20


# ------------------------------------------- WHAT THE SKY DOES TO THE GROUND
#  The sun you can see up there is the thing lighting the map, so these finish
#  the job. Turning the sky orange and leaving these alone gets you an orange
#  sky over a scene lit for some other afternoon.

#  Strength of the sunlight at its highest. The sun never gets above forty
#  degrees here, so in practice it is always scaled down by dusk_lift.
# sun_light_intensity = 1.15
#  What is left of the light with the sun right on the horizon, as a fraction.
#  Never 0 -- a match played in the dark is not a match.
# dusk_lift           = 0.35
#  The colour the sunlight takes as it drops, blended towards sun_color as it
#  climbs back up.
# dusk_color          = 1.00 0.34 0.10

#  Ambient: the sky bouncing around. ambient_from_sky is how much of the sky's
#  own colour up-facing surfaces pick up; ground_bounce is what comes back up
#  off the sand onto the undersides of things.
# ambient_intensity   = 0.34
# ambient_from_sky    = 0.75
# ground_bounce       = 0.20 0.13 0.08
