Protected_Protected_Protected_Protected_The clear color of the renderer.
Protected_Protected_This frame's camera near/far and raw projection matrix, stashed here so flushPostProcess()
(called later, from a pass with no camera parameters of its own) can hand them to HBAO for
reconstructing view-space position from the opaque depth buffer. _frameProjMatrix is also
handed to WebGLRenderPass.execute() as an explicit parameter every frame (see below) for
WebGLClusterCullPass, rather than being a public field passes reach for directly.
Protected_Protected_Protected_Protected_Cached light data to avoid GC pressure.
Protected_Protected_Protected_Protected_Global quality settings.
Protected_Protected_Shared by WebGL1Renderer/WebGL2Renderer's _getWebGLTexture() -- also written to from
their render-target and disposal code paths.
ReadonlycontextPer-instance bundle of DeviceCaps/ShaderRegistry/AssetManager -- see RendererContext.
ProtecteddefaultProtecteddefaultProtecteddefaultProtecteddefaultProtectedglOptionalonOptional callback triggered when the GPU context is lost.
The global post processing volume/group.
ReadonlytypeThe type of the renderer.
Gets the clear color of the renderer.
Whether the underlying GPU context has been lost.
True while the current render() call is targeting an offscreen RenderTarget/
RenderTargetCube (a DynamicReflectionProbe face or a PlanarReflectionNode), rather
than the main camera's canvas. WebGLShadowPass uses this to skip re-rendering the
directional-light cascade atlas for these secondary, differently-angled cameras -- the
atlas is fit to the main camera once per frame and shared by every pass; rebuilding it
from a probe's much wider, differently-positioned view clobbered it with geometry culled
to that probe's frustum, which could leave nearby dynamic objects (e.g. an orbiting moon)
unlit/black in the reflection.
Gets the global quality settings of the renderer.
Protected_Common early-exit checks _getWebGLTexture() needs regardless of WebGL1 vs. WebGL2 (whose
upload paths otherwise differ -- WebGL2 additionally handles TextureArray via
texImage3D). Returns the texture to use if any of these apply, or undefined if the
caller should fall through to its own upload logic.
A RenderTarget has no .image -- its GL texture already exists from being rendered into
(populated in each renderer's own render-target bind path), so it's looked up in the cache
instead of uploaded, mirroring the WebGPU renderer's identical RenderTarget handling.
Applies the previous frame's Hierarchical-Z occlusion culling results (if ready) by setting
occlusionCulled on the tested objects. Called once per frame, before FrustumCuller.cull().
WebGPU-only (see docs/adr/0008-hzb-occlusion-culling-webgpu-only.md); a no-op on WebGL1/WebGL2
and whenever occlusion culling isn't enabled.
Captures the opaque depth buffer into a sampleable DEPTH24_STENCIL8 texture, for
underwater/refraction depth-fade effects (e.g. OpenWaterMaterial). Only possible while
an HDR FBO is active: _hdrFbo's depth/stencil renderbuffer has a known, fixed format
(DEPTH24_STENCIL8), which blitFramebuffer requires to match the capture texture's
format exactly. Without post-processing (rendering straight to the default framebuffer),
the actual depth/stencil format is implementation-defined, so capture is skipped -- water
materials fall back to their non-depth (Fresnel-based) blending in that case.
ProtectedcreateDestroys the renderer and releases its resources.
Extracts all lights from the scene for rendering.
The scene to extract lights from.
An object containing all extracted light data.
ProtectedinitInitializes the renderer.
Optionalattributes: Record<string, unknown>Optionalconfig: EngineOptionsProtectedreleaseReleases the GPU geometry buffer, compiled program, and textures this object was referencing, for whichever of those its refCount drops to zero. Called once per removed object per frame; implemented per-renderer since these caches are renderer-specific (each renderer has its own GL context).
Renders shadow maps for all shadow-casting lights.
Sets the active render target for off-screen rendering. If null, the renderer targets the screen/post-processing buffer.
The target to render into.
OptionalactiveCubeFace: number
Optional. Which face (0-5) of the RenderTargetCube to render into.
Sets the size of the render viewport.
Stages the clustered light culling grid metadata into the (not-yet-uploaded) global UBO --
see docs/adr/0007-clustered-lighting-webgl2-webgpu-only.md. Actual GPU upload happens via
updateGlobalUBO()'s trailing _globalUBO.update(), called right after this in the same
frame (WebGLClusterCullPass runs before WebGLShadowPass in _passes).
Screen-space tile size in pixels, [width, height].
WebGL 2.0 implementation of the renderer.