tile
The surface Ashcross itself is painted with. The **city** slice owns it; the doctor and the infected are drawn with `art.sprite` instead.
art.tiles.tile
The surface Ashcross itself is painted with. The city slice owns it; the
doctor and the infected are drawn with art.sprite instead.
A city made of one-unit tiles drawn as one quad per tile is thousands of entities and a wall that repeats the same cell twenty times. This shader takes the other route: one quad covers a whole run of tiles, and the variation happens per tile inside the fragment shader.
| Repeat | tiles_x x tiles_y is how many tiles the quad covers, so a six-by-three block of masonry is a single draw at correct texel density instead of eighteen quads or one stretched picture. |
| Variation | the sheet holds variants painted cells starting at frame_base; each tile hashes its own position, picks one, and mirrors itself at flip_chance. |
| Painted light | top_light lays a warm band along the edge facing the sky and shade_bottom drops the underside into soot — which is what makes a flat quad read as a ledge. radial turns the whole quad into a soft pool of light instead, which is how every brazier, lantern and lit window in the district is lit. There are no scene lights in this game; this is the lighting. |
| Keying | same contract as art.sprite — the image generators paint a flat background rather than writing alpha, so props cut themselves out here. |
Two things that cost time, written down
A keyed piece samples mip 0. A lower mip has already averaged the flat background into the subject, and that average is neither — it survives the key and comes out as a magenta rind, or, on a piece drawn small, as a magenta bar where a chain should be.
The key reads the RAW sample; the tint is applied after it. Tinting first
moves the background away from the colour the key is looking for and the key
quietly stops working. Even sampling mip 0, bilinear filtering under heavy
minification still blends the key colour into the subject, so key_tolerance
has to be generous — around 0.78 for a piece drawn a few tiles wide — and
key_despill pulls the surviving edge toward its own grey so the cut-out does
not wear a rind of the colour it was painted over.
Properties
base_color · emissive · base_color_texture · frames_x frames_y
frame_base variants seed flip_chance · tiles_x tiles_y inset ·
top_light top_color top_band shade_bottom v_up · fog_mix fog_color
· radial radial_power · key_mode key_color key_tolerance
key_softness key_despill alpha_cutoff
v_up = 1 when the quad's v = 0 edge is the one pointing at the sky, which is
the case for a plane stood up with {0.7071068, 0, 0, 0.7071068}.
Scoped to this part · feeds back into the world's score.