Skip to content

@awaken/render ​

The WebGPU rendering package: the Renderer, the render-settings and post-effect stack, cameras and render-layer culling, lights and cascaded and point-light shadows, render textures, Simulations and their update passes, texture probes, primitive meshes, the hook material system, GPU compute, and device setup. It depends only on @awaken/core.

This page is the API surface; for how a frame is drawn (PBR lighting, shadows, post-processing) see the Rendering section.

ts
import { Renderer, initGPU, defaultRenderSettings, cubeMesh } from "@awaken/render";

You set the device up once, upload assets and settings as they change, then hand the renderer a World and camera matrices each frame:

Everything below Renderer.render is internal. See Rendering Pipeline Overview for what each pass does.

device ​

WebGPU setup and capability probing. Awaken asks for optional features when the adapter has them (indirect-first-instance, texture-compression-bc, timestamp-query) and branches on GPUCaps where they are absent.

SymbolSignatureDescription
initGPU(canvas, maxDpr = 2) => Promise<GPUContext>Request an adapter + device, configure the canvas, and return the context. Throws WebGPUUnsupportedError if WebGPU is unavailable.
GPUContextinterface{ canvas, device, context, format, caps, adapterInfo, adapter?, depthTexture, depthView, width, height, renderScale, maxRenderPixels?, resize(), reconfigure() }. reconfigure() configures the canvas again for a page returning from the background.
GPUCapsinterface{ indirectFirstInstance, maxStorageBuffersPerStage, textureCompressionBC, timestampQuery, maxTextureDimension2D }.
WebGPUUnsupportedError / GpuStartFailureclass / "no-webgpu" | "no-adapter" | "device-failed"Why WebGPU could not start.
onGpuError(fn | null) => voidRoute WebGPU validation errors to a sink (the editor's Console). Repeats of one message are throttled to one counted line a second.
effectiveRenderScale(cssW, cssH, dpr, renderScale, maxPixels) => numberThe backing-store scale after renderScale and the pixel budget.
probeAdapters() => Promise<AdapterOption[]>Detect a discrete + integrated GPU choice (empty when there is only one).
savedGpuPref / setGpuPref() => GPUPowerPreference / (pref)Read/write the persisted GPU power preference.
textureCompressionBCSupported() => booleanModule-level mirror of BC support (so the import dialog can gate compression without a context).

renderScale (0.25–1) sets the internal render resolution; maxRenderPixels caps the pixel count whatever the canvas size (0 = off). See Performance.

Renderer ​

The WebGPU renderer. Construct it with new Renderer(ctx, opts?). opts.editor takes createEditorKit (the grid, picking, selection outline and camera inset); a shipped game passes nothing and compiles none of those shaders. opts.deferPipelines compiles nothing at construction: the loader calls preparePipelines(world) once the scene is in.

Frame & scene ​

MethodSignatureDescription
render(world, view, proj) => voidDraw one frame from the given camera matrices.
needsDraw(view, proj) => booleanWhether render would show anything the canvas does not already hold. The player skips frames that return false.
requestDraw() => voidForce the next frame to draw (scripts: api.requestDraw()).
onDrawRequestsetterCalled when the renderer goes from nothing to draw to something to draw, so a slowed frame loop can wake.
pick(world, view, proj, px, py, mask?) => Promise<Entity | null>GPU id-buffer pick at a device pixel; mask skips render layers. Returns null on a renderer built without the editor kit.
invalidate() => voidMark the draw cache stale.
syncTransforms(world, worldMats, entities) => voidPush moved entities' matrices and material fields into the instance buffers without a rebuild.
syncLights(world, worldMats) => voidRe-gather the lights for the next frame (walks light entities only).
setStepTransforms(steps | null) => voidPer-fixed-step matrices, so a Simulation's camera steps draw each step as it was.
moveObject(e, mat) => booleanFast-path single-object matrix update (false if a rebuild is needed).
setCullingMask / cullingMask(mask) => void / numberThe screen pass's render-layer mask, from the screen camera's cullingMask or the Scene view's Layers menu.
sceneBounds() => { x, y, z, r } | nullA sphere around every drawn object, from the cache's bounding spheres.
preparePipelines(world, opts?, onProgress?) => Promise<number>Compile, asynchronously, the pipelines this scene draws with.
pipelineStats() => { mode, created, warmed, late }late names pipelines a deferred renderer compiled synchronously on first use.
getStats() => RenderStatsPer-frame stats: draw calls, vertices, batches, instances, shadow draws, CPU rebuild/cull ms, GPU pass timings (-1 without timestampQuery), point-shadow slots and bakes, and targetPasses.

Assets ​

MethodSignatureDescription
uploadMesh / removeMesh(id, data, opts?) => void / (id, opts?)Upload/replace or free a mesh. opts.dynamic keeps it out of static merging (runtime meshes a script rebuilds).
updateSkinnedMesh(id, positions, normals?, colors?) => voidIn-place vertex rewrite for a CPU-skinned or deformed mesh (same topology).
uploadTexture(id, source, roleOverride?) => voidUpload an albedo/normal/mask texture; block-compresses to BC for the local GPU when enabled.
hasTexture / gpuTextureBytes / textureMemory(id) / (id) / numberMembership, one texture's VRAM after compression, and the total.
meshCenter(id) => Vec3 | nullLocal-space AABB centre of an uploaded mesh.
setMaterials(list: Material[]) => voidRegister the project's materials (flattening extends chains).
setGlobalParam / getGlobalParam(name, x, y?, z?, w?) / (name)A global shader value every material declaring it reads (api.setGlobalShaderParam).
updateParticles / removeParticles(handle, data, count, opts, trail?) / (handle)Per-emitter particle instance buffers, written straight to the GPU.
setSkyCube(cube | null) => voidSix RGBA faces (+X −X +Y −Y +Z −Z) as an sRGB cube; null reverts to the gradient sky.
computeGpuComputeThe executor behind api.gpu (see GPU compute).
meshStore, tex, targets, particleBufsstoresThe focused modules the renderer delegates to (MeshStore, TextureStore, RenderTargets, ParticleBuffers).

Render textures, cameras and Simulations ​

MethodSignatureDescription
setRenderTextures(descs: ReadonlyMap<string, RenderTextureDesc>) => voidThe project's render textures. Called every frame; a changed desc frees its GPU texture so the next reference allocates the new one.
setCameraTargets(passes: TargetCameraPass[]) => voidThe cameras drawing into textures this frame, in draw order. Requests a draw only when a pass changed.
setUpdateShaders(shaders) => voidThe compiled update graphs Simulation steps run.
setSimulations(runs: SimulationRun[]) => voidThe Simulations to advance this frame (by their host's fixed clock).
setProbes / probeWindow / probeLanded(probes) / (key, step) / (runKey)Texture-probe readback requests, and the windows that have arrived.
simulationProgress / simulationStepGpuMs(key) / ()Steps a run has done and its GPU ms per step.
readRenderTexture(id) => Promise<RenderTextureReadback | null>Read a render texture's front half back (rows padded to 256 bytes).

Configuration & overlays ​

Method / FieldTypeDescription
setRenderSettings(s: RenderSettings) => voidApply the settings bag: shadows, batching, GPU cull, depth prepass, clustering, MSAA, render scale, frame cap, and the effect stack.
setSelection(entities: Entity[]) => voidWhich entities draw the selection outline (editor kit).
setGizmo / setOverlay / setToolOverlay(Float32Array | null) => voidGizmo triangles, line overlays (camera frustums, collider wireframes), and translucent tool previews (a terrain brush footprint).
setPreview({ view, proj, x, y, w, h, mask? } | null) => voidA camera-preview inset in a swapchain sub-rect (editor kit).
setPreviewTexture({ id, x, y, w, h } | null) => voidShow a render texture in a swapchain rect (editor kit).
showGridbooleanThe editor ground grid (hidden in Game/Play).
outlineColor / outlineThickness[r,g,b] / numberSelection-outline appearance.
compressTexturesbooleanCompress RGBA textures to BC at upload when the GPU supports it.
useGpuCullbooleanOpt-in GPU-driven frustum culling (needs indirect-first-instance).
materialTime / materialAnimnumberThe clock hook WGSL reads as globals.time, and its speed.
pointShadowStatsPointShadowStatsPoint-shadow slots used and cubes baked this frame.

render (settings & effects) ​

Render settings are split into always-present engine config and an add/remove effect stack modelled on Unity's post-process Volume: an absent effect is not applied, so no default fog or bloom leaks into an ungraded import.

SymbolSignature / ShapeDescription
RenderSettingsinterfaceshadowStrength, cascadeCount, shadowDistance, shadowCache, staticBatching, staticMergeMaxUses, staticMergeBudgetM, useGpuCull, depthPrepass, clusteredLighting, physicalLightFalloff, drawDistanceScale, msaaSamples, renderScale, maxFps, maxRenderPixels, uiReferenceHeight, and effects.
defaultRenderSettings() => RenderSettingsShadow strength 0.85, 3 cascades, 120 m shadow distance, shadow cache on, batching on (8 uses, 8 M-vertex budget), GPU cull, depth prepass, clustering and physical falloff off, MSAA 1, render scale 1, maxFps 0 (display rate), no pixel budget, uiReferenceHeight 0, and the sky + ambient effects.
RenderEffectsinterfaceBase modes tonemap and dither, plus the optional cards sky, ambient, fog, colorGrade, liftGammaGain, shadowMidHigh, bloom, vignette, ssao.
DEFAULT_TONEMAP"aces"What an unset tonemap renders as.
EFFECT_KEYSreadonly tupleThe add-menu order: ["sky","ambient","fog","colorGrade","liftGammaGain","shadowMidHigh","bloom","vignette","ssao"].
EFFECT_LABELSRecord<EffectKey,string>Display labels ("Color Adjustments", "Ambient Occlusion (SSAO)", …).
defaultEffect(key) => EffectThe neutral value for a freshly added effect.
defaultEffects() => RenderEffectsA blank scene's stack: sky + ambient (intensity 0.29).
effectsFromFlat(FlatRender) => RenderEffectsConvert the flat render bag the Godot/Unreal loaders produce into effects (only the fields the source set).
SkyEffectinterfacezenith, horizon, ground, optional cube, stars (StarsEffect), sun and moon (SkyBody, with a phase), and sunSquare (0 a disc, 1 a square).
AmbientEffect, FogEffect, ColorGradeEffect, LiftGammaGainEffect, ShadowMidHighEffect, VignetteEffect, SsaoEffectinterfacesPer-effect parameter shapes.
BloomEffectinterfaceintensity, threshold, scatter (stored, read by neither mode), tint, and mode.

tonemap is "linear" (hard clamp, Godot), "aces" (Narkowicz fit, the default) or "acesHill" (Stephen Hill's ACES RRT + ODT fit, then the piecewise sRGB curve). dither: true adds up to one 8-bit code value of noise after the grade, re-rolled every frame. See Post-processing and Render Settings.

bloomChain ​

SymbolSignatureDescription
BloomMode"gaussian" | "mipChain"gaussian (absent mode): a bright pass and one 5 × 5 blur at half resolution. mipChain: a 13-tap Karis-weighted prefilter, a 13-tap downsample per level and a tent upsample back up (Jimenez 2014).
MAX_BLOOM_LEVELS / bloomLevels7 / (w, h) => numberMip-chain depth by frame size, 2 to 7 levels.
effectiveBloomIntensity(intensity, mode, levels) => numberThe intensity shared out over the chain's levels.
BloomChain / chainPassesclass / (levels) => ChainPass[]The chain's GPU resources and its pass list.

volume ​

SymbolSignatureDescription
VolumeComponentType + interfaceA post-process volume object: mode (local/global), shape (box/sphere), size, radius, priority, weight, blendDistance, effects, overrides. Fields: Component Reference.
VolumeZone / EffectOverridesinterfacesA resolved world-space volume, and per-effect lists of the fields that blend (Unity's m_OverrideState).
gatherVolumeZones / volumeZoneOf(world) / (world, e)Resolve Volume components to zones.
blendVolumes(base, zones, eye) => RenderEffectsBlend every zone's effects over the base stack at the camera position, in ascending priority.
zoneInfluence / zoneContains / zoneDistanceSqhelpersThe weight a zone has at a point.
migrateZonesIntoScene / zoneToEntityJSONhelpersTurn a legacy project's flat per-scene volume list into Volume entities.

camera & orbit ​

SymbolSignatureDescription
CameraComponentType + interfaceProjection (perspective/orthographic), fov, orthoSize, fit, fitAspect, turn, near, far, and the render-texture fields targetTexture, cullingMask, clear, clearColor, order, overrideMaterial. Fields: Component Reference.
activeCamera(world) => Entity | nullThe screen camera: the first active, enabled camera with no targetTexture.
cameraMatrices(world, entity, mats, aspect, view?) => { view, proj }View + projection for a Camera entity, applying Fit and the portrait turn.
orthoBounds / cameraTurned / turnedView / turnClockwisehelpersThe orthographic rect after Fit, and the quarter-turn for turn: "portrait".
perspectiveZO(out, fovyRad, aspect, near, far) => Mat4Perspective projection, WebGPU clip space.
orthographicZO(out, left, right, bottom, top, near, far) => Mat4Orthographic projection, same view space and depth direction as perspectiveZO.
lookAt(out, eye, target, up) => Mat4Right-handed view matrix.
cameraPositionFromView / transformPointhelpersWorld camera position from a view matrix; apply a matrix to a point with perspective divide.
fitFarPlane(eye, bounds, min = 1000, max?) => numberA far plane that reaches the scene's bounding sphere, clamped between min and max to keep depth precision.
OrbitCameraclassThe editor's orbit/pan/zoom viewport camera.

renderLayers & cameraTargets ​

SymbolSignatureDescription
RENDER_LAYER_COUNT32Layers, named in Project Settings (index 0 "Default").
ALL_RENDER_LAYERS / DEFAULT_RENDER_LAYERS0xffffffff / 1A camera's default mask; an object's default layer bits (layer 0).
renderLayersOf / cullingMaskOf(v) => numberAuthored values to the u32 the cull compares.
filterByLayerMask(visible, layers, mask) => number[]Drop objects that share no bit with the mask.
TargetCameraPassinterfaceOne camera drawing into a texture: entity, target, width, height, view, proj, mask, clear, clearColor, order, overrideMaterial.
gatherTargetCameras(world, mats, descs) => TargetCameraPass[]Every active, enabled camera whose target exists, by order then entity id.
screenCullingMask / sameTargetshelpersThe screen camera's mask; whether two pass lists draw the same.

Render layers decide what a camera draws, not what casts shadows. A target pass is the forward colour pass only: no sky, particles, shadow passes, SSAO, post or tonemap. See Render Textures.

renderTexture & renderTargets ​

SymbolSignatureDescription
RenderTextureDescinterface{ name, width, height, format, filter, address, doubleBuffered, clearColor }.
RenderTextureFormat / RENDER_TEXTURE_FORMATSunionrgba8unorm, rgba16float, rg16float, r16float, r32float, rgba32float. The two 32-bit float formats are neither filterable nor blendable (rtSampleable, rtBlendable, rtReadError).
RenderTextureFilter / RenderTextureAddressunionslinear | nearest; clamp | repeat | mirror.
RT_DEFAULT_SIZE / RT_MAX_SIZE256 / 4096Default and largest edge.
RT_PREFIX / rtTextureId / rtIdOf"rt:"A render texture is sampled as texture id rt:<id>.
normalizeRenderTexture / renderTextureFormatErrorhelpersAny input to a valid desc.
RenderTargets / RenderTargetclassAllocates a texture on first reference; a double-buffered target keeps a front and a back half.
selfSampleFilter / encodeTargetDrawshelpersA pass never samples the texture it writes: a single-buffered target skips those draws, a double-buffered one reads its previous frame.

simulation, simulationComponent & quality ​

SymbolSignatureDescription
SimulationDesc{ name; textures; cameraSlots; steps: SimStep[] }A Simulation asset: an ordered list of GPU steps.
SimStep{ kind; enabled; when; graph?; target?; source?; slot?; repeat? }kind is update (run an update graph into its target, repeat passes, swapping a double-buffered target after each), camera (a bound camera draws its target), clear or copy. when is step (every fixed step) or reset (once after a Reset).
SIM_MAX_REPEAT256Most passes one update step runs.
normalizeSimulation / normalizeSimStephelpersAny input to a valid desc; an unknown kind becomes a disabled update step.
RenderUpdateShader / packUpdatePassUniforms / updatePassLayoutEntries / updateSamplerDesctypes + helpersThe compiled update pass the renderer runs and its uniform and binding layout.
SimulationComponentTypeRuns a Simulation asset on its object: simulation, simulateInScene, paused, cameras. Fields: Component Reference.
SimulationStates / advanceSimulations / gatherSimulationRuns / simulationEntitiesclass + helpersPer-entity step counts on the fixed clock, and the runs handed to Renderer.setSimulations.
SIM_CATCHUP_PER_FRAME / SIM_SKIP_AHEAD20 / 600A renderer's copy of a run that fell behind (a pipeline compiling, a hidden view) runs at most 20 steps a frame; more than 600 behind, it jumps ahead instead of replaying.
QualityLevel / QualitySettingsinterfacesProject Settings, Quality: named levels that scale render texture sizes (textures), update-step passes (repeats) and renderScale.
normalizeQuality / qualityLevel / chosenQualityLevelhelpersWhich level runs: the URL's awaken-quality=<name>, else the one the game saved (api.quality.set), else the default.
qualityRenderTextures / qualitySimulationshelpersApply a level to the descs.

See Simulations and the Simulation panel.

textureProbe ​

SymbolSignatureDescription
TextureProbeComponentTypeReads a render texture at its object's position: texture, window (default 24, PROBE_MIN_WINDOW 4 to PROBE_MAX_WINDOW 128), bounds (the world rectangle the texture covers).
ProbeRequest / ProbeWindowinterfacesOne readback of a texel window around an object, and the floats that came back.
gatherProbeRequests / probeRequest / worldToTexelhelpersRequests for every probe after a fixed step.
sampleProbeWindow / decodeProbeTexelshelpersSample a window in world units; decode the readback bytes per format.
probeHandle / probeOwner / probeGatehelpersapi.probe(entity)'s sample(x, y); which Simulation writes a texture; how many fixed steps may run before a probe's window must land (Project Settings, Time, Probe delay).

light & shadow ​

SymbolSignatureDescription
LightComponentType + interface{ kind: "directional" | "point" | "spot", color, intensity, range, spotAngle, layers, castShadows, shadowedLayers }.
gatherLights(world, mats) => PackedLight[]Collect active lights into GPU-packed records.
lightDrawOrder(lights, eye) => number[]Which lights the fixed per-fragment budget keeps: directional first, then by brightness × range over distance.
LIGHT_FLOATS / writeLightRecord / PackedLight16 / helpersThe 64-byte light record.
ALL_LIGHT_LAYERS0xffffffffEvery light layer: the default for Light.layers, Light.shadowedLayers and MeshRenderer.lightLayers.
lightLayerMask(v?) => numberAn authored mask as the u32 the GPU compares: absent or non-finite is every layer.
NO_SHADOW_SLOT0xffffffffA light record's "no shadow cube" slot.
POINT_SHADOW_BUDGET / POINT_SHADOW_HYSTERESIS / POINT_SHADOW_SIZE / POINT_SHADOW_REBAKES_PER_FRAME / POINT_SHADOW_NEAR16 / 4 / 256 / 4 / 0.05Point and spot shadow cubes: slots per frame, rank slack before a light loses its slot, texels per face, static re-bakes per frame, near plane.
pickShadowSlots / casterSignature / cubeFaceViewProjhelpersSlot assignment, the static-caster signature that decides a re-bake, and per-face matrices.
computeCascadeMatrices(view, proj, sunDir, count, nearD?, farD?, shadowMapSize?) => { mats, splits }Cascaded-shadow-map light matrices + split distances.
directionalLightMatrix(dir, center, radius) => Mat4A single directional light's ortho view-proj.
holdSunDir / sunHoldThresholdDeghelpersHold the cascade basis until the sun has turned far enough to matter, so a slow day cycle does not re-fit every frame.
shadowCasterKind(o) => "none" | "dynamic" | "static"Which shadow cache a caster belongs in.

Cascades: up to 4, with static-caster caching. Point and spot lights with castShadows get a cube map while they hold one of 16 slots. See Shadows and PBR & Lighting.

primitives & shape2d ​

Procedural MeshData generators, used for built-in shapes and collider previews.

SymbolSignatureDescription
MeshDatainterface{ positions, normals, uvs, indices, colors? }: the renderer's canonical mesh shape.
cubeMesh(size = 1) => MeshDataUnit cube, per-face normals.
sphereMesh(radius = 0.5, seg = 24) => MeshDataUV sphere.
planeMesh(size = 1, seg = 1) => MeshDataXZ plane facing +Y (seg subdivides it for vertex-stage hooks).
quadMesh(size = 1) => MeshDataUnit quad in the XY plane facing +Z: the sprite/2D primitive (quad builtin id).
cylinderMesh(radius = 0.5, height = 1, seg = 24) => MeshDataCapped cylinder along Y.
capsuleMesh(radius = 0.5, height = 2, seg = 24, capRings = 8) => MeshDataCapsule (cylinder + hemisphere caps).
gridLines(halfExtent, step) => Float32ArrayEndpoint positions for an XZ grid.
Shape2DComponentTypeA rounded box, circle or capsule in the object's XY plane that builds its own quad and doubles as a 2D collider shape.
shape2dMesh / shape2dMeshId / shape2dDistance / syncShapes2DhelpersThe quad (shape size carried in its vertex data, so a material can rebuild the signed distance), its mesh id, the CPU distance, and the per-frame mesh sync.
VERTEX_BYTES / interleaveMesh / computeNormals28 / helpersThe interleaved vertex layout. See Mesh format.

material ​

Hook-based materials: authored WGSL snippets (vertexPosition, discard, surfaceNormal, surfaceColor hooks, in execution order) plus a typed parameter schema, composed into the base mesh shader at pipeline-build time. A shader that fails to compile falls back to the default pipeline rather than breaking the frame.

SymbolSignature / ShapeDescription
Materialinterface{ version, id, name, hooks, params, unlit?, unfogged?, blend?, interpolators?, globals?, extends?, metadata? }. unlit skips lighting but keeps fog; unfogged skips fog (sky domes, additive FX); extends names a material whose params, globals and hooks this one inherits and overrides.
MaterialParam{ name, type: ParamType, default, perObject, … }One parameter. perObject params can be overridden per entity via MeshMaterial.overrides.
ParamType / PARAM_TYPESunion"float" | "vec2" | "vec3" | "vec4" | "color" | "bool" | "texture" | "buffer".
MaterialHooks{ vertexPosition?, discard?, surfaceNormal?, surfaceColor? }WGSL hook bodies. vertexPosition mutates world, surfaceNormal mutates N, surfaceColor mutates albedo + outAlpha; discard runs before the albedo sample.
MaterialBlend / MATERIAL_BLENDSunionalpha (default), additive, premultiplied, min. Pipeline state only; it never changes the composed WGSL (blendStateFor, drawsTransparent).
MaterialGlobalinterfaceA global value a material reads by name (globals.<name>), set at runtime, shared by every material declaring it. GLOBAL_PARAM_SLOTS = 16 lanes.
flattenMaterials(list) => Material[]Resolve extends chains.
composeShader / composeShaderMapped(baseTemplate, m, table?) => string | ComposedShaderCompose final WGSL from a template + hooks + generated structs. A pure string splice: it does not compile and cannot fail. The mapped form also returns spans: HookSpan[] so a compiler error routes back to its hook.
MAX_MATERIAL_TEXTURES / MAX_MATERIAL_BUFFERS4 / 2Texture and storage-buffer params per material.
materialReadsClock / materialDisplaces / materialNeedsScenePos(m) => booleanWhether hooks read globals.time (keeps the player drawing every frame), displace vertices, or read the scene-position prepass.
packMaterialParams / materialParamFloats / MATERIAL_PARAM_FLOATShelpers / 64Pack a material's params into a 256-byte per-object slot.
materialValidationError(m) => string | nullReject a malformed schema before compile.
MaterialCache<P>classDedups compiled pipelines by composed-shader hash; async compile with a fallback.

There is no built-in material registry: every material comes from the project's materials (authored in the editor or imported from a .awakenmat) and is registered with Renderer.setMaterials. Starter content ships Water.awakenmat, Wind.awakenmat, Water-Graph.awakenmat and Wind-Graph.awakenmat under starter-content/materials/. See the Shader Editor, Shader Graph and Materials.

GPU compute ​

SymbolSignatureDescription
GpuComputeclassThe executor behind api.gpu: content declares its own textures (texture), buffers (buffer) and WGSL compute shader assets, then queues write, clear, copy, dispatch and read. A material samples a resource as gpu:<name>. No renderer pass, pipeline or frame binding is exposed.
GpuTextureFormat / GpuBindingtypesrgba16float, rg16float, r16float, r32float, rg32float, rgba8unorm, r32uint; one binding of a dispatch.

Shared types ​

SymbolDescription
MeshRendererComponentType + interface: mesh, colour, metallic, roughness, texture, opacity, transparency and sortOrder, shadows, doubleSided, alphaCutoff, emissive, normalTexture, dataVertexColors, vertexColorTint, lightLayers, renderLayers, and instanceTexture / instanceCount (one draw of N instances placed by a render texture's texels). Fields: Component Reference.
MeshMaterialComponentType + interface: { material: string, overrides }. overrides (materialParams) is a sparse map of this object's values for the material's perObject params.
LodGroup / updateLods / lodLevelForPer-object mesh switching by camera distance; updateLods runs per frame in the editor and player.
MeshPlacerPuts runtime-generated meshes in the scene for api.mesh.place: pools entities, so a chunk streamer does not bump structureRev per chunk.
TextureRole / TextureFormat"albedo" | "normal" | "mask" (drives format + colour space) / "rgba8" | "bc1" | "bc3" | "bc4" | "bc5".
pickTextureFormat, FORMAT_GPU, shouldCompressTextures, TEXTURE_MEMORY_BUDGETFormat selection by role/content/device. Without an explicit choice, shouldCompressTextures compresses when the textures' uncompressed RGBA with mips exceeds 256 MB.
encodeBC1 / encodeBC3 / encodeBC4 / encodeBC5CPU block encoders used at upload.
createEditorKit / EditorKitThe editor-only furniture factory passed to the constructor.

See also ​

Awaken: browser-native WebGPU game engine.