asc_lens.renderFeature
ASCENSION's lens. Six passes at `afterLighting`, in the order light passes through a camera: the circle of confusion (`asc_coc`, order 300), the disc gather (`asc_gather`, 302), a composite back into the scene colour (305), the camera-velocity smear (`asc_camblur`, 310), its comp…
asc_lens
ASCENSION's lens. Six passes at afterLighting, in the order light passes
through a camera: the circle of confusion (asc_coc, order 300), the disc
gather (asc_gather, 302), a composite back into the scene colour (305), the
camera-velocity smear (asc_camblur, 310), its composite (313), and the copy
that carries this frame's camera into the next frame's smear (asc_camsave,
316).
The visual result is a photographed frame rather than a rendered one: what sits at the focus distance is sharp and everything else falls off the way an aperture makes it, and a moving camera leaves the exposure's smear instead of a stack of instantaneous samples.
Both halves have an off switch on the parameter buffer (lens_params[3].x for
defocus, [3].y for the shutter), so either can be A/B'd against the same
frame without unloading anything.
Driven by preseed.asc.asc_shots, which owns asc_lens_params and creates the
feature. The handle is RAII — asc_shots holds it for the life of the part.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2ASCENSION aspect 2 — the lens: depth of field, then the shutter. Four compute passes and two composites, in the order light passes through a camera. Defocus first, because the circle of confusion is a property of the lens and the subject's distance and has nothing to do with how long the shutter was open; then the smear, over the image the lens formed. 1. `asc_coc` — the signed circle of confusion each pixel projects. 2. `asc_gather` — a disc gather at that radius. 3. composite — the defocused image back into the scene colour. 4. `asc_camblur` — the exposure's smear, from depth and the two cameras. 5. composite — the exposed image back into the scene colour. 6. `asc_camsave` — this frame's camera, kept for the next frame's smear. WHY THIS FEATURE EXISTS RATHER THAN THE TWO THAT SHIP. Both shipping systems are real and neither was cheapened here; each is blocked on something this session cannot change. `bokehBlur.renderFeature` resolves its two compute shaders through `asset.resolve("~.dof_coc", …)`, and neither `dof_coc`, `dof_gather` nor the `dof_common` shaderModule they include is present in this engine build's builtin bundle — the engine has no `shaderModule.assetType` at all. The feature errors on its first render and the engine drops it, which is why the part was uniformly sharp for 35 seconds. The optics in `asc_coc` and `asc_gather` are that package's own, carried across unchanged. `shutterBlur.renderFeature` reconstructs per-object motion from `@scene.motion`, which carries zero for opaque geometry on the deferred path. The aspect brief scopes this part's blur to camera velocity only, and camera velocity is exactly recoverable from depth and the two cameras, so `asc_camblur` reads depth instead of a velocity buffer. The parameters ride one buffer, `asc_lens_params`, packed by `asc_shots`. The previous frame's camera rides `asc_prev_cam`, which only the GPU writes.
key(ref: any, identity: string) → string
THE PROGRAM KEY IS THE SHADER'S GUID, NOT ITS IDENTITY. A `.computeShader` is registered under its stable guid ("canonical, location-independent and collision-safe" — the asset type's own words), so a pass enqueued under the identity is skipped with "compute shader … is not registered", and because the composites below still run, compositing the render target nothing wrote paints the frame black. Registration itself happens in `asc_shots` at module load.
| arg | type | description |
|---|---|---|
| ref | any | |
| identity | string |
render(ctx: ?) → void
| arg | type | description |
|---|---|---|
| ctx | ? |
teardown( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.