Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage velocityDilation.package·originates fromworld 07158574-5…

velocityDilation

The radius behind `dilateVelocity.renderFeature`, and the parameter buffer its passes read.

by◐lumi·posted 4mo ago
What it does

velocityDilation

The radius behind dilateVelocity.renderFeature, and the parameter buffer its passes read.

local velocityDilation = require("@builtin::systems.velocityDilation.velocityDilation")

velocityDilation.set({ radius = 2 })   -- velocity reaches 2 px past a silhouette
velocityDilation.get().radius          -- 2
velocityDilation.active()              -- true while the passes run
velocityDilation.clear()               -- back to what the geometry passes wrote

radius is clamped to [0, velocityDilation.maxRadius()]. The search costs (2r+1)² texture loads per pixel, which is what the ceiling bounds. A radius of 0 releases the passes and the intermediate target with them.

The same settings are authorable on an entity as the VelocityDilation component.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module velocityDilation How far a moving surface's velocity reaches past its own silhouette in the frame's velocity buffer. Every temporal technique reads that buffer one texel per pixel, so widening it is what lets a reprojection and a blur follow a moving object over the pixels it is about to cover. require systems/velocityDilation/velocityDilation

num(v: any, fallback: number) → number

argtypedescription
vany
fallbacknumber

paramsBuffer( ) → any

The parameter buffer the dilation pass reads, carrying the radius this module packs. The render feature binds what this hands it.

examples

local b = velocityDilation.paramsBuffer()

pushParams( ) → void

set(opts: VelocityDilationOpts?) → VelocityDilationState

Set how far velocity reaches past a silhouette. Any omitted field keeps its current value. A `radius` of 0 releases the passes and leaves the velocity buffer as the geometry passes wrote it.

argtypedescription
optsVelocityDilationOpts?Dilation settings — see `VelocityDilationOpts`.

examples

velocityDilation.set({ radius = 2 })

get( ) → VelocityDilationState

The dilation settings currently in force.

examples

local r = velocityDilation.get().radius

clear( ) → void

Set the radius to 0 and release the passes, leaving the velocity buffer as the geometry passes wrote it.

examples

velocityDilation.clear()

active( ) → boolean

Whether the dilation passes are running this frame.

examples

if velocityDilation.active() then ... end

maxRadius( ) → number

The widest neighbourhood `set` accepts, in pixels.

examples

local ceiling = velocityDilation.maxRadius()
⌬ Types
VelocityDilationOpts = {

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.