# rblur
Abyssal Garden port: depth-aware 3x3 blur of the half-resolution light shafts (`W_RBLUR`, verbatim), hiding the ray-march dither.
·computeshader · born here
❒asset # cull_reset
Abyssal Garden port, per view: zeroes the per-list instance counters before the cull passes.
·computeshader · born here
❒asset # camera
Abyssal Garden port, per view: builds the per-view block `G` (the original's 240-byte uniform: view-projection, shadow matrix, camera position + time, right/up/forward with the tangent of the half field of view, sun + purple-grotto weight, resolution, exposure / ray strength / draw distance, plus the inverse and previous view-projection) from the camera the engine is drawing (`@frame.camera`), so every abyssal raster pass draws with the view it lands in.
·computeshader · born here
❒asset # place_set
Abyssal Garden port, world generator (world.js rseed 12): the set pieces — the stone whale fluke and the shipwreck — the barrel sponges in front of viewpoint 4 and the small sponges around the fluke base; also writes the ground height under each of the six viewpoints into `OUT` for the camera.
# sprite
Abyssal Garden port: the camera-facing sprites (`W_SPR` + the kelp glints of `W_LEAF`, verbatim). `params.mode` 0: rising bubbles that wobble, grow and catch the sun (alpha-blended, records in `BB`); 1: drifting marine snow wrapped around the camera (additive, records in `BB`); 2: the gold/green kelp sparkles that sway with their kelp and twinkle (additive, records in `BB`).
# engine
Abyssal Garden port: brings the engine's own geometry (player bodies, props) into the feature's scene target. A fullscreen pass reads the lit `@scene.color` and `@scene.depth`, and where the feature's passes left a pixel uncovered it writes that colour through the same underwater fog as the rest of the scene, blended `under` so the feature's own pixels stay in front. `gain` scales the engine's lit colour into the feature's exposure. Drawn by the abyssal render feature after its sprites.
·computeshader · born here
❒asset # place_kelp
Abyssal Garden port, world generator: the kelp columns of world.js (`tryColumn` + `column`). Mode 0 places the hand-set columns framing the viewpoints (`HL`: x, z, kind, density), mode 1 throws 15000 random candidates accepted by the kelp density map. Each accepted column (one per 2.3 m cell, `OCC`) grows 2-4 stems of stem segments, 30 leaves per metre of height, its gold/green sparkles, and adds its light absorption to `KA` for the skylight bake.
# wpack
Abyssal Garden port: packs the five water mip levels into one 772x526 mip atlas with wrapped one-texel borders, which the draw shaders filter between (render targets carry no mip chain).
·computeshader · born here
❒asset # place_bubbles
Abyssal Garden port, world generator (world.js rseed 13): the bubble vents — 34 designed ones plus some of the sponge-cluster spots (`SP`) — each releasing 90-160 rising bubbles of two size classes into `BB` (two vec4 per bubble).
# leaf_shadow
Abyssal Garden port: the kelp blades (3 rows) drawn into the sun's shadow map with the shadow block (the original's `pLeafSh`).
# leaf
Abyssal Garden port: kelp blades, plants and ground cover — the original `W_LEAF` vertex and fragment stages verbatim (translucent, iridescent ribbons lit by the sun through water with caustics and the shadow map, skylight from the baked volume, emissive ground cover, slow whole-leaf sparkles). One pipeline for the 9-row, 5-row, far and ground-cover sets: `params.rows`, `params.far` and `params.wmul` stand in for the original's pipeline overrides.
·computeshader · born here
❒asset # place_sponges
Abyssal Garden port, world generator (world.js rseed 6 and 7): `params.mode` 0 — 13000 random rock spots that grow clusters of sponges and corals snapped onto the rock around them (some sponge clusters become bubble vents, appended to `SP`); mode 1 — the 16 dense sponge and coral gardens, each filled up to its count from random seabed vertices inside its radius.
·computeshader · born here
❒asset # fluke
Abyssal Garden port, world generator: the signed distance field of the stone whale fluke (world.js `meshFluke`: three chains of tapered, z-squashed capsules smooth-unioned), sampled on its 186x216x76 grid as density (> 0 inside) for the GPU surface nets.
# manta_motion
Abyssal Garden port: motion vectors for the mantas drawn by `manta.rasterShader`. The vertex stage pulls the same mesh and instance buffers, places each vertex with the same time-driven swimming path at this frame's time and at the previous frame's (`tPrev`), and projects both through this and the previous render's view-projection (`@frame.camera`); the fragment stage writes the NDC displacement into `@scene.motion`, depth-tested `lessEqual` without writing so only the visible manta surface is written. Drawn by `abyssal.renderFeature` at `afterLighting`, right after the camera-motion pass (`motion.rasterShader`), so TAA follows the swimming mantas instead of smearing them.
# solid
Abyssal Garden port: the seabed, rocks, set pieces (whale fluke, shipwreck), sponges and corals — the original `W_SOLID` vertex and fragment stages verbatim (layered rock with encrustation and algae, triplanar detail, sun through water with caustics and the shadow map, skylight and openness from the baked volume, fog), vertices pulled from storage buffers. Drawn by the abyssal render feature.
# fish_motion
Abyssal Garden port: motion vectors for the fish schools drawn by `fish.rasterShader`. The vertex stage pulls the same mesh and instance buffers, places each vertex with the same time-driven swimming path at this frame's time and at the previous frame's (`tPrev`), and projects both through this and the previous render's view-projection (`@frame.camera`); the fragment stage writes the NDC displacement into `@scene.motion`, depth-tested `lessEqual` without writing so only the visible fish surface is written. Drawn by `abyssal.renderFeature` at `afterLighting`, right after the camera-motion pass (`motion.rasterShader`), so TAA follows the swimming fish instead of smearing them.
·computeshader · born here
❒asset # density
Abyssal Garden port: the seabed density field (`W_DENS`, verbatim) on the 512x80x512 world grid (> 0 in rock), from the designed mesas, arches, tunnels and clearings in `P` with domain-warped fbm and worley detail. Dispatched once by the abyssal render feature.
# solid_shadow
Abyssal Garden port: the solid meshes (seabed, rocks, set pieces, sponges, corals) drawn into the sun's shadow map with the shadow block (the original's shadow pipelines over `W_SOLID` vs).
·computeshader · born here
❒asset # place_clusters
Abyssal Garden port, world generator (world.js rseed 3): 40000 random seabed vertices that grow clusters of ribbon leaves on flat ground, grasses in the grotto and hot spots, hanging fronds under overhangs and tufts on walls.
# half
Abyssal Garden port: a 2x2 box downsample (the original's `fsMip` mip pass), used to build the water texture's mip levels each frame.
# surf
Abyssal Garden port: the water surface seen from below and the background (`W_SURF`, verbatim). `params.mode` 0 draws the 1800 m surface quad around the camera with Snell's window, total internal reflection and the sun's glitter; 1 draws the far background where no terrain is drawn, as the water looks at 240 m.
·computeshader · born here
❒asset # detail
Abyssal Garden port: the tileable rock detail texture (`W_DETAIL`, verbatim: rg slope, b height, a mottling) and its mip chain. `params.mode` 0 evaluates level 0 into the packed buffer M, 1 box-filters level `params.lev` from the level above, 2 packs every level into the 3D (one slice) mip atlas with a wrapped one-texel border — render targets carry no mips, so the draw shaders filter between atlas levels themselves.
·computeshader · born here
❒asset # gmap
Abyssal Garden port, world generator: the 512x512 ground map over the 384 m world (world.js): r = magenta ground cover, b = purple grotto zone, a = sand. Written into a one-slice 3D texture the draw shaders sample.
# bloom
Abyssal Garden port: the bloom chain of `W_BLIT` (verbatim): `params.mode` 0 is the first, firefly-weighted (Karis) downsample from the scene, 1 a plain 4-tap downsample, 2 the 4-tap upsample drawn additively into the next larger level.
·computeshader · born here
❒asset # flag
Abyssal Garden port: writes 1 into `F[0]`. Enqueued beside the one-time shadow-map bake so a readback can confirm a drawn frame carried it.
# rays
Abyssal Garden port: the volumetric light shafts (`W_RAYS`, verbatim), ray-marched at half resolution through the sun's shadow map with the caustic pattern of the water surface and the baked openness volume as mist; alpha keeps the linear depth for the depth-aware blur and upsample.
# post
Abyssal Garden port: the final composite (`W_POST`, verbatim): depth-aware upsample of the half-resolution light shafts over the HDR scene, a touch of bloom, exposure, vignette, the ACES-style tone curve, the soft contrast/desaturation grade and the gamma-2.2 encode with a dither — written into `@scene.color` already linearised so the engine's own output encode lands on the original's code values.
# motion
Abyssal Garden port: camera motion vectors for the abyssal render feature's world. A fullscreen pass reads `@scene.depth` and the feature's scene target (`tS`, whose alpha marks the pixels the feature covered), reprojects each covered pixel through the previous render's view-projection from `@frame.camera`, and writes the NDC displacement into `@scene.motion`, so the engine's temporal AA reprojects the seabed, kelp and water instead of ghosting them while the camera turns. Pixels the feature left uncovered (player bodies and other engine geometry) are discarded and keep the engine's own vectors. Drawn by `abyssal.renderFeature` at `afterLighting`, before the engine-geometry composite.
# meshes
Abyssal Garden port: the procedural meshes of math.js / world.js built on the CPU — rock chunks (icospheres sculpted by fbm and cut by planes), lathed barrel sponges, branching corals (with low-detail versions), tube sponges, the shipwreck, the manta ray and the fish — packed into one vertex run (f32 xyz + snorm8x4 normal/aux) and one index run with per-mesh ranges (`build`), plus the fish schools / mantas / drifting particles (`creatures`) and the hand-placed kelp columns around the viewpoints (`handColumns`). Required by the abyssal render feature.
# fish
Abyssal Garden port: the schools of fish (`W_ANIM` vsFish / fsFish, verbatim) — each fish circles its school's centre on a wavy orbit with its own offset and a swimming tail wiggle; vertices pulled from the shared mesh buffers, instances (2 vec4 each) from `I`.
·computeshader · born here
❒asset # cull_args
Abyssal Garden port, per view: copies six lists' instance counts (from `params.first`) into their indirect draw arguments.
# water
Abyssal Garden port: the animated 512x512 water texture (`W_WATER`, verbatim): r = caustic pattern, ba = surface slope from ten travelling waves. Redrawn every frame; `params.t` is the time.
# layout
Abyssal Garden port: the world layout constants of the original world.js / main.js — grid size and origin, designed mesas, arches, tunnels, clearings, magenta patches, the six viewpoints (POSES), the 60 s camera path (FLY), the sun direction and its shadow matrix — plus `primBuffer()` (the density shader's primitive list) and `flyPoints()` (points along the camera path the generator keeps clear).
·computeshader · born here
❒asset # cull_leaf
Abyssal Garden port, per view: sorts the leaves into the original's draw sets — 9-row blades within 24 m, 5-row to 58 m, every second blade (drawn 1.5x wider) to 150 m, and ground cover to 70 m (all scaled by the draw-distance setting) — frustum-culled per leaf, appending ids to `IDS` and counts to `COUNTS`.
·computeshader · born here
❒asset # place_small
Abyssal Garden port, world generator (world.js rseed 5): 620000 random flat seabed vertices that grow magenta tufts where the ground map is magenta and blue-green blades in the grotto and hot spots.
·computeshader · born here
❒asset # vol
Abyssal Garden port, world generator: one layer (`params.y`, run from the surface down) of the half-resolution 256x40x256 light volume of world.js: r = openness (how far from rock), g = skylight, the light of the layer above blurred and attenuated by rock and by the kelp's absorption (`KA`, fixed point /1000). Written into the 3D texture `outT`.
·computeshader · born here
❒asset # cull_solid
Abyssal Garden port, per view: sorts the solid instances (boulders, set pieces, sponges, corals, rock chunks, pebbles) into per-mesh draw lists with the original's draw distances and LOD switches (coral LOD past 6 m, far LOD of the big rock chunks from 40 to 150 m), frustum-culled per instance. `params.shadow` takes every shadow-casting instance at full detail for the shadow-map bake.
·computeshader · born here
❒asset # nets
Abyssal Garden port: naive surface nets on the GPU (the original `surfaceNets` in math.js), in two passes over a scalar grid D (> 0 inside). `params.mode` 0: one vertex per cell the surface crosses (mean of its edge crossings, normal from the trilinear gradient), appended to V as (world xyz, packed snorm normal) with its id kept per cell in CI. Mode 1: the quads joining the cells around each crossed edge, wound like the original so the outside faces the water, appended to IX. Used for the seabed and the stone whale fluke.
·computeshader · born here
❒asset # place_rocks
Abyssal Garden port, world generator: `params.mode` 0 — the floating boulder clusters (world.js rseed 8: eleven designed, nine random, big rocks with a halo of small fragments, bobbing, kept out of the rock); 1 — ground rocks (rseed 9); 2 — rock chunks on slopes and walls (rseed 10), the large ones with a far LOD; 3 — pebbles and rubble on the sea floor (rseed 11).
·computeshader · born here
❒asset # conn
Abyssal Garden port, world generation: which rock is connected to the seabed (the original's flood fill in main.js). `params.mode` 0 marks each column's unbroken run up from the bottom, 1 is one propagation sweep (rock touching connected rock becomes connected; run repeatedly), 2 turns rock that never connected (specks of noise floating in the water) into water by negating its density.
# manta
Abyssal Garden port: the manta rays (`W_ANIM` vsManta / fsManta, verbatim) — banking orbits, flapping wings with a travelling wave, a swaying tail, gill slits, a dark back with pale shoulder marks and an iridescent sheen.
·computeshader · born here
❒asset # place_cover
Abyssal Garden port, world generator (world.js rseed 4): the dense carpets of tiny magenta tufts, taller blue-green blades and ground sparkles in the 15 magenta patches, about 45 tries per square metre, kept on flat floor.