createParticleDistortionRenderer(device, sceneFormat, width, height)

setDistortionParams(renderer, params = {})

renderDistortionPass(encoder, renderer, instanceCount, frameData)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleDistortionRenderer.js Heat haze / distortion from particles PopcornFX/Niagara parity: particles can distort the scene behind them. Hot particles, explosions, and magic effects create screen space UV offsets. Pipeline: 1. Render distortion emitting particles to an RG16float texture (UV offset) 2. Composite pass samples scene color with distorted UVs The distortion texture stores per pixel UV offset (R=deltaU, G=deltaV). Particles contribute based on temperature/emissive strength. Functions Create the particle distortion rendering system Parameters: (GPUDevice) — No description in source JSDoc. (string) — Scene color format (e.g. 'bgra8unorm') (number) — Render target width (number) — Render target height Create bind groups for the distortion pass (call once when particle buffers are ready) Update distortion params Parameters: (Object) — No description in source JSDoc. (Object) — { strength, temperatureThreshold, falloffPower } Render distortion pass: accumulate UV offsets from hot particles Parameters: (GPUCommandEncoder) — No description in source JSDoc. (Object) — No description in source JSDoc. (number) — Number of particles to render (Float32Array) — Frame uniforms data (viewProj, viewRight, viewUp, cameraPos) Composite distortion onto scene (fullscreen triangle) Parameters: (GPURenderPassEncoder) — Active render pass targeting the scene framebuffer (Object) — No description in source JSDoc. Resize distortion texture when viewport changes Destroy distortion renderer resources <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss


GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleEffectRegistry.js Custom Particle Effect Storage & Management Features: IndexedDB persistence across sessions Import/export as JSON files Built in presets always available Version tracking for effect updates Event based notifications for changes Classes Method Signature Summary Initialize the registry (opens IndexedDB) Load all effects from IndexedDB to cache Get all effects (built in + custom) Get built in presets only Get custom (user created) effects only Get effect by ID Check if effect exists Save effect to registry Save to IndexedDB Delete from IndexedDB Create a new effect from scratch Clone an existing effect Export effect as JSON Export all custom effects as JSON Import effect from JSON Reset effect to built in default Clear all custom effects Subscribe to registry changes Notify listeners of changes Search effects by name or description Get effects by category (based on name/description keywords) Functions Validate one exact v1/v2 record; no lossy upcasts are attempted. Get the global registry instance Initialize the global registry Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device


automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleEmissiveDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer)

setParticleEmissiveParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


updateFieldProbes(renderer, device, chargedParticles, gridConfig)

renderFieldArrows(pass, renderer, viewProj, cameraPos, viewRight, viewUp)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleFieldRenderer.js Electromagnetic Field Visualizer (GAP 42) Renders electric/magnetic field lines and force arrows around charged particles. Computes field probe grid on CPU from charged particle positions, uploads to GPU. Supports arrow glyphs showing force direction/magnitude. Color: red=positive/repulsion, blue=negative/attraction, intensity=magnitude. Usage: const fr = createFieldRenderer(device, format); updateFieldProbes(fr, device, chargedParticles, probeGrid); renderFieldArrows(pass, fr, viewProj, cameraPos, viewRight, viewUp); Functions Create the field renderer. Initialize bind groups. Generate field probes from charged particle positions (CPU side). Creates a 3D grid of probe points and computes the E field at each. Parameters: (Object) — { min, max, resolution } Render field arrows in the given render pass. Destroy. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device


Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createHalfResCompositeSystem(device, format, fullWidth, fullHeight)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleHalfResComposite.js Half resolution particle rendering + bilateral composite Renders particles to a half res RGBA target, then composites onto the main framebuffer with alpha blending. Provides 4× fill rate reduction for particle rendering. ==================== PIPELINE OVERVIEW (for future AI/developers) ==================== The particle color pipeline works as follows: 1. CPU writes per particle color to metaBuffer in ParticleEmitterSystem.js: singleMeta[0..2] = emitterColor[0..2] (RGB from elementMixToEmitterConfig) → uploaded via device.queue.writeBuffer to GPU metaBuffer 2. SDF vertex shader (particles sdf billboard.js) reads: uMeta[ii].xyz → input.color Uses instance index (ii) directly — NO alive list indirection in SDF path. The billboard shader (particles billboard vertex.js) DOES use uAliveList, but the active renderer is SDF (set in EditorParticles.js: particles.pipeline = sdfRenderer.pipeline). 3. SDF fragment shader applies volumetric lighting + thermal glow to input.color, outputs vec4<f32 (lit, finalAlpha) — NON premultiplied. 4. SDF pipeline renders INTO this half res texture with blend mode: color: src alpha, one minus src alpha (standard alpha blend) This produces PRE MULTIPLIED RGB in the texture because: result.rgb = src.rgb src.a + cleared black (1 src.a) = src.rgb src.a 5. This composite pass reads the half res texture and blends onto the scene. MUST use pre multiplied blend (srcFactor='one') because step 4 already multiplied RGB by alpha. Using srcFactor='src alpha' would DOUBLE the alpha (lit alpha²), making low alpha particles nearly invisible. CRITICAL: If you change the SDF pipeline blend mode, you must update this composite blend mode to match.


alpha²), making low alpha particles nearly invisible. CRITICAL: If you change the SDF pipeline blend mode, you must update this composite blend mode to match. src alpha render → 'one' composite. premultiplied render → 'one' composite. Ref: GPU Gems 3 Ch.23 "High Speed Off Screen Particles" Functions Create the half resolution particle rendering + composite system. Parameters: (GPUDevice) — No description in source JSDoc. (GPUTextureFormat) — Main framebuffer format (e.g. 'bgra8unorm') (number) — Full resolution width (number) — Full resolution height Resize half res render targets. Call when the window/canvas resizes. Get the render pass descriptor for the half res particle pass. Clear to transparent black (0,0,0,0) so alpha blending composites correctly. After particles render here with src alpha blend, the texture contains pre multiplied color: rgb = lit alpha, a = combined alpha. Execute the composite pass: upsample half res particles onto main framebuffer. Parameters: (Object) — Half res composite system (GPUCommandEncoder) — Command encoder (GPUTextureView) — Main framebuffer texture view Destroy half res composite system resources. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas:


requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleLightingDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer)

setParticleLightingParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create particle lighting pass renderer Create data bind group for lighting pass Update lighting pass parameters <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


async createParticleMeshRenderer(device, options = {})

renderMeshParticles(pass, renderer, options = {})

setMeshParticleParams(renderer, params = {})

flushShadowDepth(pass, renderer, lightViewProj, instanceCount)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleMeshRenderer.js Instanced Mesh Particle Renderer (GAP 9) Renders each particle as a 3D mesh instance instead of a billboard. Supports both regular triangle meshes AND voxel meshes (compact u32 format). Each particle's position/velocity/meta drives a mesh instance: Position from particle positions buffer Rotation from velocity direction (velocity aligned) or billboard Scale from meta.w packed size Color tint from meta.rgb Age based fade from pos.w / vel.w Usage: const renderer = await createParticleMeshRenderer(device, { format, mesh }); // In render loop: renderMeshParticles(pass, renderer, world, { viewProj, instanceCount }); Functions Create a particle mesh renderer. Parameters: (GPUDevice) — No description in source JSDoc. (Object) — No description in source JSDoc. (string) — Canvas format (e.g. 'bgra8unorm') (Object) — { vertexBuffer, indexBuffer, indexCount, indexFormat } (boolean) — true to use compact u32 voxel vertex format (number) — MESH ALIGN VELOCITY, MESH ALIGN BILLBOARD, MESH ALIGN WORLD Set the mesh to render per particle. Parameters: (Object) — No description in source JSDoc. (Object) — { vertexBuffer, indexBuffer, indexCount, indexFormat? } Bind particle data buffers from a particle world. Parameters: (Object) — No description in source JSDoc. (Object) — Particle world Render mesh particles into a render pass. Parameters: (GPURenderPassEncoder) — No description in source JSDoc. (Object) — No description in source JSDoc. (Object) — { viewProj, cameraPos, time, instanceCount } Update mesh particle renderer params. Lazily initialize the shadow depth pipeline for particle mesh shadow casting. Call once before the first flushShadowDepth. Requires dataBindGroup


params. Lazily initialize the shadow depth pipeline for particle mesh shadow casting. Call once before the first flushShadowDepth. Requires dataBindGroup to be set. Parameters: (Object) — No description in source JSDoc. Render mesh particles into a shadow depth pass (depth only, no color). Compatible with ShadowMapPass.renderShadowDepth(). Parameters: (GPURenderPassEncoder) — Depth only render pass (Object) — Particle mesh renderer (Float32Array) — 4x4 light view projection matrix (16 floats) (number) — Number of particle instances to draw Destroy the renderer. Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleNormalsDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer)

setParticleNormalsParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create particle normals pass renderer Create data bind group for normals pass Update normals pass parameters <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


initOrbitalBindGroups(renderer, device, positionBuffer, velocityBuffer, elementBuffer, lutBuffer, colorLutBuffer)

renderOrbitals(pass, renderer, viewProj, cameraPos, viewRight, viewUp, instanceCount)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleOrbitalRenderer.js Electron Cloud / Orbital Renderer (GAP 40) Renders electron probability clouds around atom particles using raymarched spherical harmonics. Color by element (CPK convention) from element table. LOD: full orbital at close range, simple sphere at distance. Usage: const orb = createOrbitalRenderer(device, format); renderOrbitals(pass, orb, { positionBuffer, elementBuffer, colorLutBuffer, camera }); Functions Create the orbital renderer. Initialize bind groups for orbital rendering. Render orbital clouds in the given render pass. Destroy. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/ParticlePhaseVFX.js
Functions
createPhaseVFXConfig(overrides = {})
getPhaseVFXShader()
Constants
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticlePhaseVFX.js Phase Transition Visual Effects Manager (GAP 43) Manages phase transition visual effects for particle rendering. Provides WGSL snippet injection for existing billboard/SDF fragment shaders. Controls: frost crystallization, melt sheen, boiling bubbles, ionization arcs. The actual rendering is done by injecting applyPhaseVFX() into existing particle fragment shaders. This module manages the configuration and provides the WGSL code for inclusion. Usage: import { phaseVFXWGSL } from '../shaders/modules/core/particles phase vfx.js'; // Include phaseVFXWGSL in particle fragment shader // Call applyPhaseVFX(baseColor, uv, time, phase, temperature, latentProgress) Functions Create a phase VFX configuration object. Parameters: (Object) — No description in source JSDoc. Get the WGSL snippet for phase VFX. Include this in particle fragment shaders to enable phase transition effects. Returns: WGSL code Constants — Phase VFX configuration. These values are passed to shaders via existing particle uniform buffers. Re exports <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition


supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create a particle quality manager Parameters: (Object) — No description in source JSDoc. (number) — Target render FPS to maintain (default: 60) (number) — Target sim FPS to maintain (default: 60) (number) — FPS threshold for emergency culling (default: 20) (number) — Sim FPS threshold for throttling (default: 50) (number) — Maximum particle count (for cullThreshold) (Function) — Callback when quality changes significantly (Function) — Callback when sim rate drops below threshold Constants — Default quality presets <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


initSPHSurfaceBindGroups(renderer, device, positionBuffer, velocityBuffer, thermalBuffer)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleSPHSurfaceRenderer.js SPH Fluid Surface Renderer (GAP 44) Screen space rendering of SPH fluid particles as smooth liquid surface. Bridges SPH particle data (GAP 36) into the existing FluidWaterPass pipeline. Pipeline: 1. Render SPH particles as sphere impostors → depth texture 2. Bilateral blur → smooth surface 3. Thickness accumulation → subsurface scattering 4. Composite with refraction + reflection + Fresnel Per element tint from element table: water=blue, lava=orange, blood=red. Usage: const ssr = createSPHSurfaceRenderer(device, format, width, height); initSPHSurfaceBindGroups(ssr, device, positionBuffer, velocityBuffer, elementBuffer, colorLutBuffer); renderSPHSurface(ssr, encoder, { sceneColor, sceneDepth, camera, particleCount }); Functions Create the SPH surface renderer. Full SSFR pipeline: depth → bilateral blur (H+V) → thickness → normals + composite. Initialize bind groups for all SSFR passes. Create composite bind group (needs scene color texture view). Reads smoothed depth (blurTextureB) + thickness for full SSFR composite. Set fluid tint color (e.g., from element). Render SPH fluid surface (full SSFR pipeline). Pass 1: Depth (sphere impostors) Pass 2: Bilateral blur H Pass 3: Bilateral blur V Pass 4: Thickness (additive) Parameters: (GPUCommandEncoder) — No description in source JSDoc. (Object) — { particleCount, viewProj, view, proj, cameraPos, viewRight, viewUp } Composite SPH surface onto the scene in a render pass. Destroy. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one


reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleSdfDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer, thermalBuffer, sphDensityBuffer, classBuffer)

createParticleSdfLutSixWayBindGroup(renderer, colorGradientView, colorGradientSampler, lifetimeCurvesView, lifetimeCurvesSampler, sixWaySystem)

setParticleSdfParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create volumetric SDF particle renderer Create data bind group for SDF particle world. Binds the shared particle buffers (position, meta, velocity, thermal) to group 1. The metaBuffer contains per particle color at .rgb — written by ParticleEmitterSystem.js. If thermalBuffer is missing, a fallback with room temp defaults (293K) is created. Create depth bind group for soft particles (scene depth texture). Must be recreated when the depth texture changes (e.g. on resize). Only binds depth texture (binding 0). Does NOT include alive list buffer — the SDF vertex shader uses instance index directly, unlike the billboard shader which uses uAliveList for indirection. Create combined LUT + six way lighting bind group (group 3). Bindings 0 3: color gradient + lifetime curves LUT textures. Bindings 4 11: six directional lightmap textures + sampler + params. Merged into one group to stay within WebGPU maxBindGroups=4. Parameters: (Object) — SDF renderer (GPUTextureView) — Color gradient RGBA8 texture view (GPUSampler) — Linear sampler for gradient (GPUTextureView) — Lifetime curves RGBA32float texture view (GPUSampler) — Sampler for curves (non filtering for rgba32float) (Object) — Six way lighting system from ParticleSixWayLighting.js Update SDF particle rendering parameters Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper


, its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


flushBillboardShadowDepth(pass, caster, lightViewProj, sunDir, instanceCount)

flushAllParticleShadows(pass, caster, lightViewProj, sunDir, billboardInstanceCount)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createSixWayLightingSystem(device, config = {})

generateProceduralSixWay(system, device, preset = 'smoke')

async loadSixWayTextures(system, device, images)

setSixWayLightDirection(system, lightDir, intensity = 1.0)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleSixWayLighting.js Six Way Lightmap Particles (GAP 24) Pre baked lighting from 6 directions (+X, X, +Y, Y, +Z, Z) sampled based on dominant light direction. Creates a fake 3D volumetric look on flat billboard particles, especially useful for smoke and fog. Matches Unity VFX Graph six way lighting feature. The system bakes a 6 channel lightmap texture (3 RGBA8 textures for 6 directions, or a single RGBA16float with packed channels). At render time, the fragment shader blends between the 6 maps based on the light direction relative to the billboard. Usage: const sixway = createSixWayLightingSystem(device); loadSixWayTextures(sixway, device, { right, left, top, bottom, front, back }); // Or generate procedural maps: generateProceduralSixWay(sixway, device, 'smoke'); // Bind to particle renderer: bindSixWayToRenderer(sixway, renderer); Functions Create a six way lighting system. Parameters: (GPUDevice) — No description in source JSDoc. (Object) — { resolution } Generate procedural six way lightmaps. Parameters: (Object) — No description in source JSDoc. (GPUDevice) — No description in source JSDoc. (string) — 'smoke', 'fog', 'cloud', 'fire' Load six way textures from external image data. Parameters: (Object) — No description in source JSDoc. (GPUDevice) — No description in source JSDoc. (Object) — { right, left, top, bottom, front, back } ImageBitmap or source Update the dominant light direction. Parameters: (Object) — No description in source JSDoc. (number[]) — Normalized light direction [x, y, z] (number) — Light intensity multiplier Destroy the system. Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by


multiplier Destroy the system. Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleSizeDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer)

setParticleSizeParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })


createParticleThermalDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer, thermalBuffer)

setParticleThermalParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Particle Thermal/Blackbody Debug Pass Renderer Renders particle temperature as blackbody radiation color for debug visualization. Requires thermalData buffer (binding 4) in addition to standard particle buffers. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createTrailHistorySystem(device, maxParticles, config = {})

initTrailHistoryBindGroups(system, device, positionBuffer, velocityBuffer, metaBuffer)

updateTrailHistories(system, device, particleCount, dt = 1/60)

renderTrailHistories(pass, system, frameBindGroup, particleCount)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleTrailHistory.js Per Particle Trail Histories (GAP 26) Individual per particle position history trails. Unlike ribbon trails (which connect sequential particles into a strip), this stores N frames of position history PER particle and renders each as a fading afterimage. Think sparks leaving comet tails, or tracers behind projectiles. Architecture: Ring buffer: historyBuffer[maxParticles × historyLength × vec4] stores position snapshots GPU compute shader shifts history and writes current position each frame Render pass draws each trail point as a small billboard, fading by age Usage: const trails = createTrailHistorySystem(device, maxParticles, { historyLength: 16 }); initTrailHistoryBindGroups(trails, device, positionBuffer, velocityBuffer); // Each frame: updateTrailHistories(trails, device, particleCount); renderTrailHistories(pass, trails, frameBindGroup); Functions Create a per particle trail history system. Parameters: (GPUDevice) — No description in source JSDoc. (number) — No description in source JSDoc. (Object) — No description in source JSDoc. (number) — Number of position snapshots per particle (default 16) (number) — Base trail point width (default 0.05) (number) — Fade curve exponent (default 2.0) (number[]) — Trail color [r, g, b] (default [1, 1, 1]) (string) — Render target format (default 'bgra8unorm') Initialize bind groups. Update trail histories (GPU compute pass). Call once per frame before rendering trails. Render trail histories as additive fading billboards. Parameters: (GPURenderPassEncoder) — Active render pass (Object) — Trail history system (GPUBindGroup) — Frame uniform bind group (group 0) (number) — Active particle count Destroy the system.


— Active render pass (Object) — Trail history system (GPUBindGroup) — Frame uniform bind group (group 0) (number) — Active particle count Destroy the system. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createParticleVelocityDataBindGroup(renderer, positionBuffer, metaBuffer, velocityBuffer)

setParticleVelocityParams(renderer, { size = 1, quality = 1.0, lodBias = 1.0, cullThreshold = 0 })


createRopeGPURenderer(device, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: RopeGPURenderer.js GPU driven rope/tube mesh generation Generates tube geometry from rope particle positions entirely on the GPU. Reads particle positions from the simulation buffer and outputs vertex data for rendering as a triangle mesh. Features: Compute shader generates tube vertices from particle chain Configurable tube radius and segment count Automatic tangent/normal/binormal frame calculation Twist resistant frame propagation (parallel transport) Indirect draw support for variable length ropes Classes Method Signature Summary Create a compute bind group for a specific rope using particle position buffer Generate tube mesh for a rope on the GPU Render the generated rope mesh Functions Create a rope GPU renderer instance Parameters: (GPUDevice) — No description in source JSDoc. (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but


mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createRopeRenderSystem(device, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: RopeRenderSystem.js Integration layer for GPU rope rendering Connects the RopeGPURenderer with the particle simulation world's rope chain registry. Manages multiple ropes and batches rendering. Classes Method Signature Summary Update rope bind groups based on particle world state Generate tube meshes for all ropes Render all rope meshes Full update cycle: update bind groups, generate meshes, prepare for render Functions Create a rope render system Parameters: (GPUDevice) — No description in source JSDoc. (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/billboard/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: billboard/index.js — Re exports for billboard particle rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/custom/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: custom/index.js — Re exports for custom particle effects. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/debug/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: debug/index.js — Re exports for debug visualization renderers. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/distortion/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: distortion/index.js — Re exports for distortion and phase VFX rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/index.js
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Particle System Exports Barrel file for easy importing of all particle related modules. Re exports , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/mesh/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: mesh/index.js — Re exports for mesh particle rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/rope/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: rope/index.js — Re exports for rope/wire rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/sdf/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: sdf/index.js — Re exports for SDF volumetric particle rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/surface/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: surface/index.js — Re exports for SSFR surface rendering pipeline. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/particles/trail/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: trail/index.js — Re exports for trail and beam rendering. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/AbyssalCameraRig.js
Classes
class AbyssalCameraRig
Functions
startAbyssalCameraRig(options)
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Applies a restrained floating camera offset to isolated DOM scenery planes. WebGPU/2D canvases and document root styles are deliberately excluded so animation cannot invalidate the page or disrupt GPU presentation textures. Method Signature Summary Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


startAbyssalDiveTeam(layers, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Authored three person dive team for the abyssal landing scene. The team uses a deterministic mission state controller instead of random action switching: swim, illuminate, inspect, signal, then inspect again. Individual response, phase, depth, and kick timing keep the formation alive without compromising buddy proximity or opaque paint ordering. Method Signature Summary Keeps the survey formation descending with the reader, even while paused. Viewport space regulator exhaust anchors consumed by the shared water pass. The full body cels are painted in a 2:1 band inside a square stage, so the forward quarter of that stage tracks the face/regulator across every role. Viewport space bodies used for local bubble entrainment and fin wakes. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module


the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


startAbyssalFaunaField(layers, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Small DOM fauna field for the authored abyssal landing scene. Local flock rules are deliberately limited to fish on the same depth plane. Method Signature Summary Directs the fixed fauna layers through the page's scroll story. Upper swimmers dissolve continuously through the hero descent; two small sculpin remain solid and re enter beside the lower rock shelves with the benthic ecosystem near the page bottom. Read only viewport space wakes for lightweight effects that share this scene. Only swimming fish participate; grounded habitat actors do not. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU


does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


startAbyssalSmokeAnimator(stage, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Cross faded cel animator for the authored abyssal mineral plume. Two staggered lifecycles share the registered atlas. Each lifecycle changes drawing, rises, spreads, sheds opacity, and disappears while its successor is already forming at the vent. Adjacent frame alpha always sums to one, which prevents the bright flashes produced by transition races. Method Signature Summary Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes AreaResamplePass GPU accelerated area weighted resampling Better quality than bilinear for arbitrary scale factors. Especially useful for upscaling low res renders. Method Signature Summary Initialize the resample pass Get or create an intermediate texture of the specified size Resample input texture to output texture using area weighted averaging Resample and blit to a render target (convenience method) Cleanup GPU resources Functions CPU area weighted resample for ImageData (fallback or small images) Parameters: (ImageData) — Source image data (number) — Output width (number) — Output height Returns: Resampled image data Re exports , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together.


needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/AutoExposurePass.js
Classes
class AutoExposurePass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/BloomPass.js
Classes
class BloomPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Render bloom effect <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/CascadeMetrics.js
Classes
class CascadeMetrics
Functions
getMetrics()
resetMetrics()
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes CascadeMetrics Central metrics collection for cascaded chunk system Method Signature Summary Get summary statistics Get full metrics as JSON Get compact display string Reset all metrics Functions Get global metrics instance Reset global metrics Re exports , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/CascadedShadows.js
Classes
class CascadedShadowMap
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes CascadedShadowMap Multi cascade shadow mapping system Method Signature Summary Initialize the cascaded shadow map system Calculate cascade frustum split distances using PSSM Update cascade matrices for current camera Update the main uniform buffer with all cascade data Render shadow maps for all cascades Update uniforms from config (called by ConfigLoader) Load configuration from engine.cfg section Get bind group for shadow sampling Get WGSL code for shadow sampling <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


addCanvasClearPass(frameGraph, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Re exports <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


addClothDebugPass(frameGraph, options = {})


render/passes/ColorGradingPass.js
Classes
class ColorGradingPass
Notes & Examples
Shared GPU device


render/passes/ContactShadowsPass.js
Classes
class ContactShadowsPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Initialize GPU resources Update uniform buffer Set screen dimensions Update light direction from sun Render the pass Load configuration from engine.cfg [contact shadows] section Get current config Destroy GPU resources <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/DepthOfFieldPass.js
Classes
class DepthOfFieldPass
Notes & Examples
Shared GPU device


executeDepthVisualizerPass(pass, visualizer, depthTexture, params = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Execute depth visualizer pass <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/FSRPass.js
Classes
class FSRPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: FSRPass.js FidelityFX Super Resolution 1.0 (Spatial Upscaler) Pure WebGPU/WGSL port of AMD's open source FSR 1.0 algorithm. Two pass spatial upscaler: EASU (Edge Adaptive Spatial Upsampling) + RCAS (Sharpening). Use cases: Fallback when temporal history is invalid (camera cuts, teleports) Standalone spatial upscaling for non temporal content Combined with TSR as the spatial component Pipeline: Low res input → EASU (directional upscale) → RCAS (adaptive sharpen) → Full res output EASU: Analyzes local edge direction and applies a directionally aware 12 tap filter. Detects edges via luminance gradients and stretches the filter kernel along the edge. This preserves edge sharpness while smoothing along edges (not across them). RCAS: Contrast adaptive sharpening that avoids ringing artifacts. Computes local contrast from a cross shaped sample pattern and applies sharpening proportional to inverse contrast (sharp where flat, gentle on edges). Classes Method Signature Summary Initialize FSR pass Resize for new dimensions Execute FSR upscaling Execute EASU only (no sharpening) Execute RCAS only (sharpening on already upscaled image) Load configuration <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while


engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/FXAAPass.js
Classes
class FXAAPass
Notes & Examples
Shared GPU device


render/passes/FilmGrainPass.js
Classes
class FilmGrainPass
Notes & Examples
Shared GPU device


addFluidDebugPass(frameGraph, options = {})


createFluidWaterPass(device, options = {})

renderFluidWater(pass, encoder, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create resources for the fluid water rendering pass Render water/metaball surfaces from particles Resize the fluid water pass textures Destroy the fluid water pass resources Re exports <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


addMainGeometryPass(frameGraph, options = {})


render/passes/GodRays.js
Classes
class GodRays
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes GodRays Volumetric light scattering effect WebGPU implementation with fixed 32 sample radial blur Method Signature Summary Initialize god rays Update uniform buffer with current settings Layout matches GodRaysUniforms struct (48 bytes) Render god rays to the target texture Update from sun/moon position and apply to uniforms Update from LightManager + combined viewProj matrix. Projects sun position to screen space using the viewProj directly. Scales god ray intensity by environment sun intensity × globalBrightness. Update light screen position from world position Set light world position Set light color Set effect intensity Check if light is visible on screen Apply preset Resize update internal dimensions Load configuration from engine.cfg [god rays] section Get current config for saving Get WGSL shader code Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the


device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/GroundShadowPass.js
Classes
class GroundShadowPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: GroundShadowPass.js Analytical Blob Shadows on Ground Plane Projects entity shadow casters onto the y=0 ground plane along the sun direction and renders soft circular shadows. This is the standard technique used by mobile games (Minecraft, Animal Crossing) and many 3D editors. Advantages over screen space ray marching: No depth buffer artifacts (banding, streaking) Works from any camera angle Smooth, soft shadow edges with no aliasing Very fast (one distance check per caster per pixel) Shadow casters are passed via a storage buffer (position + radius per entity). Output: Alpha blended darkening composited over the scene. Classes Method Signature Summary Call once per frame before render() — resets the caster list Add a shadow caster (call during entity iteration) <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned


use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/HDRPipeline.js
Classes
class HDRPipeline
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes HDRPipeline Complete HDR rendering pipeline Method Signature Summary Initialize the HDR pipeline Create HDR and bloom textures Create shader pipelines Update uniform buffer Resize textures Get HDR render target view Set exposure Set tonemapping operator Set bloom parameters Get tonemap operator name Apply auto exposure based on scene luminance Apply preset Load configuration from engine.cfg sections Get WGSL shader code Destroy resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/HiZPass.js
Classes
class HiZPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Initialize the Hi Z pass Resize Hi Z texture to match new screen size Build the Hi Z mip chain from the depth buffer Call this after rendering all opaque geometry Set the view projection matrix for AABB testing Test if an AABB is potentially visible (not fully occluded) This is a CPU side conservative test using the Hi Z pyramid Note: For true GPU driven culling, you'd do this in a compute shader and use indirect draw. This CPU version is simpler but requires readback. For now, we'll use a simpler heuristic based on screen space size and skip the GPU readback overhead. Get the Hi Z texture for GPU side occlusion testing Get a specific mip level view Load configuration from engine.cfg section Flush pending texture destruction Called after command submission when GPU is done with previous frames Queue pending destruction flush for next frame Call this after submitting commands to defer destruction until GPU is done Destroy GPU resources <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks


it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


projectImagePointToViewport(imageUV, viewportWidth = window.innerWidth, viewportHeight = window.innerHeight, imageAspect = 1.5,)

async startImageHeatHaze(canvas, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ImageHeatHazePass.js Layered water optics for an authored mineral plate. This is the static image counterpart to ParticleDistortionRenderer. The authored plate owns geology; this pass owns water refraction, attenuation, caustics, texture broken god rays, heat haze, and color aware lava emission. Classes Method Signature Summary Fades scene lighting while preserving refraction, ripples, and heat flow. Functions Project a point in authored image UV space into the backdrop viewport. Keep this in sync with the landing page's background size breakpoints. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/LensFlarePass.js
Classes
class LensFlarePass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


addLightingPass(frameGraph, options = {})


render/passes/MotionBlurPass.js
Classes
class MotionBlurPass
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Load configuration from engine.cfg section <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/passes/OutlinePass.js
Classes
class OutlinePass
Notes & Examples
Shared GPU device