Log inGet started
World

Mirage Wells: Desert Dunes, Oasis and Ruins Kit

README.md

HeatShimmer

Desert heat shimmer as one full-screen post pass (shaders/dk_heat_shimmer): far rays that skim the hot ground wobble with rising, horizontally stretched noise; anything nearer than 25 m stays sharp (no ghost edges); just below the horizon, far ground turns into an inferior mirage that mirrors the sky and whatever stands on the horizon. DesertAtmos drives it every frame from the heat of the day (midday 1, dusk 0.18, dawn 0.04, night 0, nothing in a storm).

local HeatShimmer = require("desertKit.HeatShimmer")
HeatShimmer.configure({ amplitude = 4, mirage = 0.8 })   -- tunables, see SETTINGS
HeatShimmer.apply(1.0, { 0.9, 0.9, 0.88 })               -- heat 0-2 and the mirage colour (DesertAtmos does this)
HeatShimmer.remove()                                      -- out of the frame
print(HeatShimmer.report().strength)

Cost: one pass, two depth reads and two or three scene reads per pixel. At heat 0 the pass stays registered but returns the frame untouched; DesertAtmosphere.shimmer = false removes it.