Set a material, tune the stack, snap a preset
1. Override a material.POST /material/set takes an entity_id plus any of albedo [r,g,b,a],
metallic, roughness, emissive [r,g,b], and alpha_mode ("opaque", "blend", or "mask:0.5"). It
creates a Material component if the entity has none:
GET /postprocess/settings returns the live stack. The headless host carries a
PostProcessSettings resource, so you read it back straight away (note the f32 round-trip noise):
ssao_enabled, fxaa_enabled, bloom_enabled all true, color grading
neutral. (Fog is the exception: its resource is created lazily on first write — see step 5.)
3. Tune a subset. POST /postprocess/settings creates the resource if absent, changes only the fields
you send, and echoes the full stack back (note the f32 round-trip, e.g. 0.8 → 0.800000011920929):
ssao_enabled, fxaa_enabled true) untouched. The fields this
route exposes are the whole story for HTTP: SSAO (enabled/radius/intensity), FXAA, bloom
(enabled/threshold), and color grading (exposure/contrast/saturation/temperature). The higher-tier effects —
TAA, motion blur, depth-of-field, SSR, IBL, PCSS — are not settable over this route; they only move via
presets or the host’s defaults.
4. Snap a quality preset. POST /postprocess/preset replaces the whole stack with low, medium,
high, or ultra:
quality (not preset). Names are case-insensitive; an unknown name returns ok:false
with the valid list. low is the only tier that disables SSAO.
5. Tune fog. Unlike the post stack, the fog resource is created lazily — GET /fog/settings returns
“resource not found” until the first write, and POST /fog/settings creates the resource and echoes the
full settings:
enabled:false in the defaults) and opt-in via this call — unlike SSAO/FXAA/bloom,
which are on.
Behavior and gotchas
The things you only find out by running it:GET /postprocess/settingsreturns the live stack immediately — the headless host boots aPostProcessSettingsresource (SSAO/FXAA/bloom on, color grading neutral).GET /fog/settingsis the lazy one: it returns"resource not found"until the first POST creates it (fog defaults off). Neither is “disabled.”- The HTTP post-process route only exposes a subset. SSAO, FXAA, bloom, and color grading are settable;
TAA, motion blur, DoF, SSR, IBL, and PCSS are not reachable over
/postprocess/settings— only through presets or host defaults. TAA/MB/DoF/SSR/IBL are off by default; PCSS is on by default at every tier. pcss_enabledis effectively inert. It’s set true by the defaults and all presets, but no render path reads the flag — soft shadows are driven by per-lightlight_size. Toggling it changes nothing.- Default indirect light is an SH sky, not IBL. Even with IBL off, diffuse indirect comes from an analytic
spherical-harmonic sky light (
LightProbe::from_sky): a procedural sky dome projected onto L2 SH irradiance and evaluated per surface normal. This is the production ambient source; an environment-map IBL is the opt-in upgrade. - IBL is bound to a dummy environment by default.
ibl_enabledis false by default and the renderer binds black placeholder cube/BRDF views until you supply a real environment map; turning IBL on without one gets you the dummy. - The
SetColorrule action is a stub. In rules-as-data,SetColorlogs “not yet implemented (needs render access)” and no-ops — it does not change a material. Drive color via/material/setinstead. - Preset field is
quality, notpreset; setters echo the full stack (with f32 round-trip noise). Onlylowdisables SSAO; it also zeroes exposure.
Endpoints
Camera framing and screenshot capture share the same render-host split — see
Camera & rendering. Generated appearance never touches the authoritative
world state (why that matters).
Status
- Shipped — metallic-roughness PBR materials, alpha modes, the post stack (SSAO/FXAA/bloom on by default),
SH sky-light ambient (the default diffuse-indirect source), color grading,
low/medium/high/ultrapresets, and volumetric fog (off by default). - Opt-in / higher-tier — TAA, motion blur, depth-of-field, SSR, IBL — implemented, off by default, and not settable over the HTTP post-process route (presets or host defaults only).
- Inert —
pcss_enabledis carried in settings but unread; soft shadows come from per-lightlight_size. - Caveat — IBL binds a dummy (black) environment until you supply a real one.
- Stub — the
SetColorrule action logs and no-ops (needs render access); it does not recolor a material. - Host-only — values are stored headless but only a GPU render host applies them visually; the headless host records the state and draws nothing.
Material & post-process endpoints
Schemas for every material, post-process, and fog endpoint.