sprite
Unlit, alpha-cut surface for pixel art: shows one cell of a sprite sheet, chosen per entity, so one material draws every sprite that shares a sheet. Level tilemaps use it too (with their atlas UVs baked into the mesh); parallax backgrounds use `twoDKit.parallax` instead.
pixelSprites.sprite
Unlit, alpha-cut surface for pixel art: shows one cell of a sprite sheet, chosen per entity, so one material draws every sprite that shares a sheet. Level tilemaps use it too (with their atlas UVs baked into the mesh); parallax backgrounds use twoDKit.parallax instead.
Per-entity ShaderData lanes:
| Lane | x | y | z | w |
|---|---|---|---|---|
lane0 | column | row (from the top) | columns in the sheet | rows in the sheet |
lane1 | flipX (> 0.5 mirrors) | flash toward white 0..1 | dithered fade 0..1 | unused |
lane2 | tint r | tint g | tint b | tint amount 0..1 |
lane3 | drawn width (art px) | drawn height (art px) | quad width (art px) | quad height (art px) |
lane3 is the pixel-crisp squash and stretch: on a padded quad pivoted at its bottom-centre, the frame is drawn x by y art pixels (each art pixel shows one texel, rows and columns repeat or drop, nothing blurs). Zero leaves the quad drawing the frame 1:1. twoDKit.sprites sets it with Sprites.setSquash.
Lanes left at zero draw the whole texture untinted, which is what a tilemap mesh with baked atlas UVs wants. Pair it with a texture whose filter is nearest for crisp pixels; twoDKit.paint's Paint.material(folder, name, textureIdentity) writes such a material for any sheet, and twoDKit.sprites drives the lanes.
Properties: base_color (multiplier), alpha_cutoff (default 0.5), base_color_texture (the sheet).
Scoped to this part · feeds back into the world's score.