Frame settings & post-processing
Every renderer.feature_* switch with its verified default, the resolution and upscaler controls, the post-process sub-objects, and what ships in the tree without being wired into the frame.
The renderer has one frame, and it is configured by plain fields on the Renderer rather than by composing
effects. There is no post-process stack to build and nothing to register: every stage below already
exists in the frame and is switched on or off where it stands. Reach the renderer from an
application as engine.graphics.renderer, or hold the Renderer you constructed yourself.
const renderer = engine.graphics.renderer; // null before Engine.start(), null again after stop()
renderer.feature_motion_blur_enabled = true;
renderer.motion_blur.strength = 2.0;
renderer.feature_dof_enabled = true;
renderer.dof.applyPreset("cinematic");
renderer.dof.focusOnNearest();
GraphicsEngine deliberately exposes almost none of this itself - renderer is the escape hatch,
and it is null outside a started engine, so check it. See
Rendering overview for the facade.
Frame timing
The engine passes simulation seconds since the last drawn frame into GraphicsEngine.render(dt). GPU particles, renderer animation and exposure adaptation advance by that delta, following the simulation clock’s pause and speed modifiers. Time accumulated while rendering is disabled is included in the next drawn frame.
When driving the renderer yourself, pass the delta to renderer.render(camera, scene, dt) (or graphics.render(dt) through the engine facade). Both default to zero: omitting the delta redraws the current state without advancing simulation.
Feature switches
Every one is a boolean on Renderer, readable and writable at any time. Defaults are read from
shade/renderer/Renderer.js.
| Switch | Default | What it does |
|---|---|---|
feature_shadows_enabled | true | Master shadow switch. When off the shadow context is disabled and CASTS_SHADOW_BIT is cleared on every light record, so no map is selected or rasterized. |
feature_tetrahedron_point_shadows | false | Generate point-light shadows with the tetrahedral (4-face) path instead of cube (6-face). Same octahedral atlas encoding either way, so it is safe to flip at runtime; it exists for A/B comparison. |
feature_ssao_enabled | true | GTAO - ground-truth ambient occlusion plus bent normals. The result lands in the alpha channel of the G-buffer albedo target, which is why GBufferTextures.albedo carries AO. |
feature_ssr_enabled | false | Screen-space reflections in every indirect-lighting mode, with the selected mode supplying fallback specular lighting. In Brick4, ProbeClipmap and ScreenProbes, enabling SSR forces the split indirect-lighting path. |
feature_restir_di_enabled | false | ReSTIR DI - stochastic screen-bounded direct shadowing of point and spot lights. When on, the deferred pass skips its froxel cluster loop entirely and consumes the ReSTIR-resolved radiance. |
feature_taa_enabled | true | The temporal resolve, and with it the upscale. The setter resets the temporal filters (SSAO, SSR, TAA, NSS, volumetrics and the screen probes) on a transition without clearing path-tracer accumulation, because the history textures go stale while it is off. |
feature_sharpening_enabled | true | FidelityFX RCAS, at a fixed sharpness of 0.8. |
feature_bloom_enabled | true | Karis-average downsample chain plus tent upsample. The chain also feeds auto-exposure, so it is built when either this or feature_automatic_exposure_enabled is on. |
feature_automatic_exposure_enabled | true | Luminance-histogram eye adaptation. When off, exposure_compensation is the fixed value. |
feature_motion_blur_enabled | false | Jimenez 2014 reconstruction filter. Configure via renderer.motion_blur. |
feature_dof_enabled | false | Depth of field. Configure via renderer.dof / renderer.dof_unreal, select with dof_algorithm. Silently skipped unless camera.isPerspectiveCamera === true - the thin-lens circle of confusion has no meaning under orthographic. |
feature_virtual_textures | true | System-wide kill switch for virtual texture streaming. When off, feedback and residency maintenance stop; already-resident pages keep rendering. Costs nothing while no stack is registered. |
feature_particles_enabled | false | GPU particles. GPUParticleEmitterSystem enables this for ParticleEffect entities. Every registered renderer emitter node is simulated on the GPU each frame and drawn through the AVBOIT transparency pipeline, order-independently against the transparent meshes and the opaque scene. The pool every emitter of a scene draws from is sized through renderer.particles(scene_context).capacity; see Particles & VFX. |
feature_path_tracing_enabled | false | Replaces the rasterized colour with renderer.path_tracer’s accumulation for the frame. Prototype-grade. Turn TAA off while it is on - two temporal filters fighting over one image. |
feature_velocity_debug_view | false | Debug: draws the per-object velocity buffer instead of the shaded image, before TAA. |
Non-boolean knobs on the same object:
| Property | Default | What it does |
|---|---|---|
indirect_lighting_mode | ShadeIndirectLightingMode.IBL | IBL: 0, Brick4: 1, ProbeClipmap: 3, ScreenProbes: 4. Configure ProbeClipmap via renderer.probe_clipmap; ScreenProbes gathers over the same world, so it reads renderer.probe_clipmap too, plus its own renderer.screen_probes. See Global illumination. |
transparency_mode | ShadeTransparencyMode.AVBOIT | Which order-independent transparency technique draws the transparent buckets: MBOIT: 0 or AVBOIT: 1. Both are wired at the one transparency call site and take the same inputs, so it is safe to flip at runtime. |
avboit | AVBOITSettings | Switches of the AVBOIT mode, read every frame while it is selected. transmission_tint_from_base_color (default false) filters what a transmissive surface lets through by its base colour, glTF-style. |
dof_algorithm | "raymarch" | "raymarch" selects renderer.dof (DepthOfField); "unreal" selects renderer.dof_unreal (DepthOfFieldU). One DoF call site, so exactly one runs. |
upscale_type | ShadeUpscalerType.TAA | TAA: 0 or NSS: 1. See The upscaler. |
exposure_compensation | 0.0 | F-stops, applied on top of auto-exposure and used as the fixed value when it is off. Reads 0 before initialize(); the setter asserts the renderer is initialized. |
tone_mapper | ToneMapper, made by initialize() | How the exposed scene colour becomes display colour: tone_mapper.operator (TONE_MAP_OPERATOR_ACES by default), tone_mapper.grade, tone_mapper.lut_resolution and tone_mapper.purkinje_shift. One operator for every output, so a scene looks alike on SDR and HDR displays. See Tone mapping and exposure. |
internal_resolution_scale | 1 | Fraction of output resolution the scene is rendered at. |
pixel_ratio | window.devicePixelRatio | Device pixels per CSS pixel. |
profile_session | null | Assign a GPUProfileSession to record GPU timings. |
Transparency itself cannot be switched off - that flag is private and always on. What is public is which order-independent technique draws it:
ShadeTransparencyMode | What it does |
|---|---|
MBOIT (0) | Moment-based OIT (Peters et al. 2017): four power moments of the transmittance function per pixel, additively blended at full resolution into r32float + rgba32float targets - which is what puts float32-blendable on the device floor. Smooth and cheap, and not depth-complexity invariant: stacked near-opaque layers leak. |
AVBOIT (1) | The default. Adaptive voxel-based OIT (Drobot, SIGGRAPH 2025): extinction splatted into a 1/8-resolution voxel volume whose depth axis is adaptively packed onto 128 slices, integrated into a 3D transmittance lookup. Depth-complexity and shift invariant, needs no 32-bit float blending, and filters the background per channel for transmissive materials when renderer.avboit.transmission_tint_from_base_color is on. |
GPU particles draw as a side channel of the AVBOIT pass - through the same volume and the same accumulators as the transparent meshes, which is what makes them composite correctly against those meshes and against the opaque scene without a depth sort of their own. Under MBOIT they are simulated and not drawn.
Order in the frame
The post chain is fixed. Reading Renderer.render_to_target top to bottom, after the scene is
complete and transparency has been composited:
AfterTransparency extensions run here; HDR, internal resolution
path tracer override feature_path_tracing_enabled
velocity debug view feature_velocity_debug_view
TAA or NSS feature_taa_enabled + upscale_type <-- resolution changes here
depth of field feature_dof_enabled + dof_algorithm
motion blur feature_motion_blur_enabled
RCAS sharpen feature_sharpening_enabled
bloom + auto-exposure feature_bloom_enabled / feature_automatic_exposure_enabled
BeforePresent extensions run here; HDR, output resolution
tone map always; tone_mapper
Overlay extensions run here; display space, drawing onto the canvas
Ambient occlusion, reflections, ReSTIR DI, shadows and the indirect-lighting mode all act earlier, during the deferred resolve, and so are not in this list. The phases named on the left are where render extensions attach.
Resolution
| Member | Type | Notes |
|---|---|---|
resize(x, y) | method | CSS pixels, not device pixels. Asserts non-negative integers. The renderer applies pixel_ratio itself. |
pixel_ratio | number | Setter re-derives both resolutions immediately. |
output_resolution | Vector2 | Read-only in practice: the getter returns a clone, so writing to it does nothing. |
internal_resolution_scale | number | Must be finite and greater than zero. Recomputed lazily at the start of the next frame. |
aspect_ratio | number | Width over height of the internal resolution. This is what to assign to camera.aspect. |
The two derivations, verbatim:
output_resolution = clamp(ceil(css_size * pixel_ratio), 1, maxTextureDimension2D)
internal_resolution = clamp(floor(output_resolution * scale), 1, maxTextureDimension2D)
The floor is one texel: depth and G-buffer textures carry a single mip level, so any scale that leaves at least one pixel along each axis is valid.
When internal_resolution or output_resolution changes, only the current frame’s depth and history targets are resized when written, so the previous frame’s depth and temporal histories stay intact and are resampled by UV across resolution steps (such as dynamic resolution scaling). indicate_view_change() resets SSAO, SSR, TAA, NSS, volumetrics, screen-probe and path-tracer history:
call it yourself after teleporting a camera or swapping a scene.
Under Engine, do not call resize directly. engine.graphics.updateSize() passes the viewport
size to renderer.resize(), and is already wired to the viewport’s size.onChanged. There is no
engine-level pixel ratio: render scale is internal_resolution_scale, which renders the frame
smaller and lets TAA upscale it, rather than the browser stretching a smaller canvas.
Dynamic resolution scaling
DynamicResolutionScaling (shade/renderer/DynamicResolutionScaling.js) is not owned by the
renderer. It reads and writes internal_resolution_scale through two assignable functions, and is
fed one number per frame.
Under Engine it is already built and wired:
const drs = engine.graphics.dynamic_resolution;
drs.enabled = false; // e.g. for a benchmark that wants a fixed resolution
drs.target_frame_rate = 60; // the engine sets 30
It is a floor-holder, not a frame-rate governor: at the engine’s default target of 30 fps it does nothing at all until a frame costs more than 33 ms, and sits at full resolution on hardware that clears the budget.
Standalone, wire it yourself:
import { DynamicResolutionScaling } from "@woosh/meep-engine/src/shade/renderer/DynamicResolutionScaling.js";
const drs = new DynamicResolutionScaling();
drs.get_scale = () => renderer.internal_resolution_scale;
drs.set_scale = v => { renderer.internal_resolution_scale = v; };
// once per frame
drs.notify_frame(frame_time_seconds);
| Field | Default | |
|---|---|---|
enabled | true | |
target_frame_time_s | 1 / 30 | target_frame_rate is an accessor over this. |
min_scale / max_scale | 0.43 / 1.0 | Hard bounds on the scale. |
tolerance | 0.10 | Dead band around the target. |
probe_step | 0.05 | Step size when probing for a better scale. |
min_useful_slope | 0.005 | Below this, scaling is not buying frame time and it bails. |
settle_frames | 30 | Frames to wait after a step before judging it. |
bail_lockout_frames | 600 | Frames to stay put after a bail. |
anomaly_clamp_multiplier | 6 | Rejects one-off frame-time spikes. |
fast_half_life_frames / slow_half_life_frames | 8 / 120 | The two smoothing filters. |
warmup_frames | 30 | Ignored frames at startup. |
Also reset() and notify_frame(frame_time_s).
The upscaler
Both upscalers consume the jittered, internal-resolution scene colour and produce an output-resolution image; they differ only in how the resolve is computed.
upscale_type | Class | Notes |
|---|---|---|
ShadeUpscalerType.TAA (default) | TAA | Variance-clip TAA in YCoCg with a Blackman-Harris resolve and depth-occlusion clip. Constructed with the renderer. |
ShadeUpscalerType.NSS | NSS | Neural Super Sampling, a kernel-prediction network. Reached as renderer.nss. |
The upscale is a phase boundary, and it is the one thing about the frame you cannot assume away.
AfterTransparency is at internal resolution; BeforePresent and Overlay are at output
resolution. The G-buffer stays readable to BeforePresent and is therefore a different size from
the colour beside it there. Never write a resolution down as a constant - ask frame.resolution, or
frame.describe(handle) for the ratio between two of them.
Two consequences worth stating:
- With
feature_taa_enabled === falsethere is no upscale at all. The two sides of the boundary are the same size, which is correct only whileinternal_resolution_scaleis1; with TAA off and the scale below 1, the frame is presented at internal resolution rather than upscaled. - The jitter sequence length is derived from the upscale ratio at every resolution change, for whichever upscaler is selected. Nothing to set.
renderer.nss is constructed lazily on first access, which is also when the bundled weights blob
decodes - so selecting NSS costs one frame and no setup. Its constructor installs the shipped
weights; nss.weights = NSSWeights.from(...) replaces them with trained weights from elsewhere.
Tuning fields include jitter_sequence_size, alpha_blend_scale, reset_history and debug_view,
plus a dozen network-tuning scalars.
Sub-objects
Ten settings objects hang off the renderer. All are constructed for you; nss and path_tracer are
lazy, probe_clipmap and screen_probes exist from construction, the rest are built in initialize().
| Accessor | Class | Module under src/shade/renderer/ |
|---|---|---|
renderer.motion_blur | MotionBlur | postprocess/motion_blur/MotionBlur.js |
renderer.dof | DepthOfField | postprocess/dof/raymarch/DepthOfField.js |
renderer.dof_unreal | DepthOfFieldU | postprocess/dof/gather/DepthOfFieldU.js |
renderer.restir_di | ReSTIRDI | restir/di/ReSTIRDI.js |
renderer.ssr | SSR | postprocess/ssr/SSR.js |
renderer.nss | NSS | postprocess/nss/NSS.js |
renderer.volumetrics | GPUViewVolumetrics | volumetrics/GPUViewVolumetrics.js |
renderer.path_tracer | AccumulatingPathTracer | path_tracer/accumulating/AccumulatingPathTracer.js |
renderer.probe_clipmap | ProbeClipmapSettings | global_illumination/probe_clipmap/ProbeClipmapSettings.js |
renderer.screen_probes | ScreenProbeSettings | global_illumination/screen_probe/ScreenProbeSettings.js |
Screen-space reflections
SSR traces screen-space depth, resolves against the selected indirect-lighting source, filters spatially and reprojects history. Configure it after the renderer initializes:
import { SSRReprojectionMode }
from "@woosh/meep-engine/src/shade/renderer/postprocess/ssr/SSRReprojectionMode.js";
renderer.feature_ssr_enabled = true;
renderer.ssr.reprojection_mode = SSRReprojectionMode.Parallax;
renderer.ssr.spatial_denoising_enabled = true;
| Setting | Default | Effect |
|---|---|---|
reprojection_mode | SSRReprojectionMode.Parallax (0) | Parallax-aware history reprojection. Surface (1) uses surface reprojection; CurrentFrame (2) disables temporal history for comparison. |
spatial_denoising_enabled | true | Enables the three spatial filtering passes independently of temporal reprojection. |
reset_history | true initially | Set to true after a camera cut or scene change; renderer.indicate_view_change() also resets it. |
Changing either mode or spatial filtering resets history. History is also invalidated when the resolution, view or indirect-lighting mode changes, or frames are skipped. A recorded frame becomes reusable history only after successful submission.
MotionBlur
One knob: strength, default 1.0. 1.0 is physically plausible, 2.0-3.0 reads as cinematic.
DepthOfField and DepthOfFieldU
Two implementations behind one interface. DepthOfField is a screen-space ray-march (the Tiny Glade
model: aperture sub-rays marched through a half-res depth/CoC buffer, plus tilt-shift);
DepthOfFieldU is an Unreal-style Diaphragm/Cinematic gather with a foreground coverage bleed. They
share every field below.
| Field | Default | |
|---|---|---|
quality | "medium" | "low" / "medium" / "high" / "ultra" - 12/24/32/48 samples, 16/24/32/48 march steps; firefly cleanup on for high and ultra. An unknown value silently falls back to "medium". |
preset | null | Set through applyPreset(name). |
focus | { mode: "auto" } | Set through the focus* helpers below. |
focus_smoothing | 0.15 | |
focus_region | 0.0 | |
f_number | 2.0 | |
focal_length_mm | null | null derives it from the camera’s field of view. |
sensor_height_mm | 24.0 | |
physical_gain | 1.0 | |
blade_count | 0 | 0 is a circular aperture. |
blade_rotation | 0.0 | |
highlight_boost | 1.0 |
DepthOfField adds march_mode; DepthOfFieldU adds near_blur_gain (default 1.0).
Focus is set through helpers rather than by writing focus directly: focusAuto(),
focusAtDistance(d), focusOnWorldPoint(x, y, z), focusOnScreenPoint(x, y), focusOnNearest(),
focusOnObject(node).
applyPreset(name) takes one of subtle, portrait, cinematic, miniature, dreamy (exported
as DOF_PRESETS / DOF_PRESET_NAMES from postprocess/dof/DOF_PRESETS.js).
ReSTIRDI
| Field | Default | |
|---|---|---|
m_initial | 8 | Initial candidate samples per pixel. |
use_screen_space_shadow | true | |
denoise_enabled | true | Edge-aware a-trous denoiser on the resolved signal. |
denoise_iterations | 3 | More iterations, wider filter, more cost. 0 is equivalent to denoise_enabled = false. |
AccumulatingPathTracer
| Field | Default | |
|---|---|---|
render_tile_size | 256 | One tile per call; the tracer accumulates across frames itself. |
min_accumulation_alpha | 0.01 | |
clear_history | false | Set by indicate_view_change(); the tracer also resets whenever the camera moves. |
Tone mapping and exposure
Tone mapping is the last pass before the canvas, and it belongs to renderer.tone_mapper, a
ToneMapper that initialize() creates. The tone mapper bakes its operator into a 3D LUT for each
output, lut_resolution texels along each edge (default 32, as in Unreal; at most the device’s
maxTextureDimension3D). Each frame then costs one trilinear fetch per pixel. A LUT is baked again only
when the operator, the resolution, the colour grade or (for HDR) the display’s peak changes, so all of
them can change at runtime. The same operator runs on SDR and HDR displays, so a scene looks alike on
both up to the SDR display’s limits. The display decides which LUT is used, through
matchMedia("(dynamic-range: high)"), and the choice is made again whenever that query changes. The
code lives in shade/renderer/deferred/tonemap/.
import { TONE_MAP_OPERATOR_GT7 } from "@woosh/meep-engine/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_GT7.js";
renderer.tone_mapper.operator = TONE_MAP_OPERATOR_GT7;
| Operator | SDR | HDR |
|---|---|---|
TONE_MAP_OPERATOR_ACES (default) | Unreal’s Filmic curve at its default settings | the SDR picture taken back to the scene through the inverse ACES 2.0 SDR output transform, then rendered with the ACES 2.0 output transform for the display; mid-grey rises with the headroom |
TONE_MAP_OPERATOR_GT7 | clips at the paper white | rolls off to the display’s peak |
TONE_MAP_OPERATOR_PBR_NEUTRAL | Khronos PBR Neutral as specified | the specification with the display’s peak in place of 1 |
TONE_MAP_OPERATOR_NONE | clips above 1.0 | shows the exposed colour as far as the display reaches |
An exposed 0.18 shows at 0.18 of SDR white under ACES and GT7. ACES has the higher mid-tone
contrast (1.36 against GT7’s 1.05). PBR Neutral shows it at 0.14. A custom operator is a
ToneMapOperator: a WGSL chunk that defines tone_map_operator(scene, peak_nits), plus optional
bindings of its own. Scene colour past 10000 cd/m² (49.3 × the paper white) clamps at the LUT’s edge.
Colour grading. renderer.tone_mapper.grade is a ColorGrade. It is neutral by default and is
baked into the LUTs ahead of the operator, so it costs nothing per pixel. It follows Unreal’s
controls, and values from an Unreal project give the same result. The stages apply in this order:
- white balance:
white_temperature(K, 6500 is neutral) andwhite_tint(-1 to 1); global,shadows,midtonesandhighlights, each aColorGradeZoneofsaturation,contrast,gamma,gainandoffset(Vector4: RGB plus a master value), blended byshadows_max,highlights_minandhighlights_max;- gain against luma:
luma_gain_red,luma_gain_greenandluma_gain_blue(multipliers) andluma_exposure(stops); - saturation against luma:
luma_saturation, times the channel’s ownluma_saturation_red,luma_saturation_greenorluma_saturation_blue(1 leaves the colour, 0 draws it to grey); - hue curves
hue_shift(degrees),hue_saturation(chroma multiplier) andhue_lightness(stops), each anAnimationCurveover the OkLCh hue in degrees.
The luma curves are AnimationCurves too, keyed by the colour’s AP1 luma in stops from middle grey,
log2(luma / 0.18), and they hold their end keys’ values beyond them. Where the three zones split
the tonal range into three bands, the luma curves grade any range of it: key a curve at a range’s
edges to lift or desaturate just that range. A curve with no keys does nothing.
A detailed grade (narrow hue bands, a full primary grade) shows more LUT error at 32³. Raise
lut_resolution to 64 for such a grade.
Your own LUTs. set_lut_sdr(resolution, data) and set_lut_hdr(resolution, data, peak_nits)
replace the baked LUT for that output until clear_lut_sdr() / clear_lut_hdr().
build_lut_sdr_from_hdr() derives the SDR LUT from a supplied HDR one through the BT.2390 EETF,
keeping hue. A LUT you supply is not graded. data is resolution³ RGB triples, red fastest, and
must follow the tone mapper’s contract: exposed scene-linear Rec.709 in, linear Rec.2020 display
light out, both as PQ (ST 2084) signals with 1 at the paper white, over a 0 to 1 domain.
Adobe .cube files load through cube_read(text) in src/format/lut/cube/, which returns a
CubeLut with the same layout; cube_write(lut) writes one back. The format carries numbers only,
so a .cube made for another pipeline (sRGB or log input, say) loads without complaint and looks
wrong. Only a file made for the contract above works as is.
import { cube_read } from "@woosh/meep-engine/src/format/lut/cube/cube_read.js";
const lut = cube_read(await (await fetch("look.cube")).text());
renderer.tone_mapper.set_lut_sdr(lut.size, lut.data);
| SDR path | HDR path | |
|---|---|---|
| Canvas format | navigator.gpu.getPreferredCanvasFormat() | rgba16float, context tone-mapping mode "extended" |
| Output space | Display-P3 when the canvas accepts it, otherwise sRGB | the same |
| Dither | 8-bit triangle noise, to kill banding | none - the space is wide enough |
The passes write in whichever primaries the canvas actually reports it was configured with. The paper
white is 203 cd/m². The browser does not report the display’s peak brightness, so an HDR LUT is baked
for renderer.tone_mapper.display.peak_nits, which is 1000 unless you set it. The SDR LUT tops out
at the paper white.
Exposure is a single scalar multiplied into the colour just before the curve:
- With
feature_automatic_exposure_enabledon (the default), it comes from a luminance histogram built over the bloom chain’s downsampled image and adapted over time. - With it off, the value is
2 ^ exposure_compensation- f-stops, default0.0- so a barefeature_automatic_exposure_enabled = falseleaves exposure at a fixed 1x. Anything comparing two renders wants adaptation off and this pinned, because eye adaptation keeps drifting for seconds after a change.
exposure_compensation asserts that the renderer has been initialized, so set it after
initialize() / Engine.start().
Purkinje shift. renderer.tone_mapper.purkinje_shift = true makes dim scenes look as night
vision does: the colour moves towards what the rods see, a single brightness carried by a blue tint.
Reds go dark and blues hold up. How far it moves depends on the luminance the view is adapted to, in
cd/m²: no shift above 5, the rods alone below 0.005, and a blend linear in log luminance between.
With automatic exposure on, that is the luminance the eye has adapted to. With it off, it is
0.18 / 2 ^ exposure_compensation, so a fixed exposure at compensation 0 sits at 0.18 cd/m², about
half rods, and the whole frame darkens under a clear blue cast. The shift is off by default. It
runs per pixel ahead of the LUT rather than inside it, so it also applies to a LUT you supply.
Frame counter and profiling
renderer.frame_count is a read-only counter, incremented after each submitted frame. It indexes the
temporal history and drives the TAA/NSS jitter sequence. renderer.onFrameFinished is a Signal
carrying the same number.
renderer.profile_session is null and the renderer never makes one - the profiler is a leaf
nothing else imports, so an application that does not mention it does not carry it. Assigning a
session and the null checks around it are the whole integration:
import { GPUProfileSession } from "@woosh/meep-engine/src/shade/device/timing/profile/GPUProfileSession.js";
import { GPUProfileLevel } from "@woosh/meep-engine/src/shade/device/timing/profile/GPUProfileLevel.js";
const session = new GPUProfileSession({ level: GPUProfileLevel.TIMING });
renderer.profile_session = session;
session.start();
// ... frames ...
const bytes = await session.stop();
renderer.profile_session = null;
GPU timings need the optional timestamp-query adapter feature. The renderer takes it when offered and
never requires it, so on a browser that withholds it the timers go quiet rather than the renderer
refusing to start.
Present in the tree, absent from the frame
Several directories under src/shade/renderer/postprocess/ ship and are reachable by import, but
nothing in the frame calls them. They are not features, and a switch for them does not exist.
| Directory | Contents | Status |
|---|---|---|
fxaa/ | shader_fxaa_311.js | Zero importers. |
lens/ | Chromatic-aberration chunks (chunk_ffx_lens_*, chunk_sample_with_chromatic_aberration) | Import each other and nothing else. |
perspective/ | shader_perfect_perspective.js | Zero importers. |
upscale-dither/ | UpscaleDither.js + its shader | Import each other and nothing else. |
vrs/ | vrs_constants.js | Reached only from shadow/ray/chunk_vrs.js to shadow/ray/graph_vrs_rtx.js, which nothing imports. The ray-traced shadow prototype beside it (shadow/ray/RTXShadows.js) has zero importers too. |
Also unused: postprocess/velocity/graph_add_camera_velocity.js - only the per-object velocity
variant is called, and that one runs every frame regardless of any switch.
See also
- Rendering overview - the
GraphicsEnginefacade and the device floor - Render extensions - putting your own passes into the frame
- Global illumination -
indirect_lighting_modein full - Lights & shadows - what the shadow switches govern
- Virtual texturing - what
feature_virtual_texturesgates