InternalThe View we are currently rendering.
Whether backfaces are currently enabled during the current frame.
Statistic that counts how many times gl.bindTexture() has been called so far within the current frame.
Whether debugging is enabled.
The vertex winding order for what we currently consider to be a backface during current frame: true == "cw", false == "ccw".
The WebGL rendering context.
IBL Layer-2 prefiltered samplers — populated by the IBL prefilter pipeline before the BRDF passes run. The smooth-shaded technique variants bind these for the split-sum specular IBL approximation:
iblIrradianceCubemap: cosine-convolved cubemap for diffuse IBLiblPrefilteredCubemap: GGX-prefiltered cubemap with mip chainiblBRDFLUT: shared 2D (NdotV, roughness) → (scale, bias) LUTiblMaxSpecularMipLevel is the highest valid mip on the prefiltered
cubemap, used to scale roughness into the lod range.
All four are null outside the BRDF binding window — the renderer
sets them in RenderManager._renderScene and clears them in
reset.
View-to-world rotation (3×3, transposed view matrix's upper-left)
uploaded as a mat3 so the BRDF shader can transform view-space
normals/reflection vectors into world space for cubemap sampling.
Populated alongside the cubemaps. Float32 column-major.
ID of the last WebGLProgram that was bound during the current frame. Used to avoid redundant program binds.
Render pass of the last _bind call. Used together with lastProgramId to detect when pass-dependent uniforms (e.g. silhouetteColor) need re-uploading even though the same program is still bound.
The current line width.
The memory configuration for the WebGLRenderer.
Whether to render a quality representation for triangle surfaces.
When false, we'll render them with a fast vertex-shaded Gouraud-shaded representation, which
is great for zillions of objects.
When true, we'll render them at a better visual quality, using smooth, per-fragment shading
and a more realistic lighting model.
TODO
Whether the WebGLRenderer is currently picking invisible objects.
The 4x4 orthographic projection transform matrix the WebGLRenderer is currently using when rendering a ray-pick.
The 4x4 viewing transform matrix the WebGLRenderer is currently using when rendering a ray-pick.
This sets the viewpoint to look along the ray, when picking with a ray.
Distance to the far clipping plane when rendering depth fragments for GPU-accelerated 3D picking.
Distance to the near clipping plane when rendering depth fragments for GPU-accelerated 3D picking.
Whether we are currently picking with a ray.
The RenderInspector for logging draw calls.
The occlusion rendering texture.
See sceneRenderWidth.
Width of the FBO the scene is currently being rendered into. Equal to
drawingBufferWidth when Tonemap.renderScale is 1; larger when
supersampling is on. Post-process passes (tonemap, FXAA) use
drawingBufferWidth — they sample this bigger scene texture down to
canvas size on the way out.
Number of shadow cascades active this frame, in [1, MAX_SHADOW_CASCADES].
View-space |z| boundaries between cascades. Entry i is the far edge
of cascade i (equivalently the near edge of cascade i+1). Only the
first shadowCascadeCount - 1 entries are meaningful.
Light direction in camera-view space (xyz). Populated alongside shadowLightViewProjMatrices and used by shadow-aware draw techniques for slope-scaled bias computation.
Concatenated array of up to MAX_SHADOW_CASCADES mat4s (16 floats
each) — shadowLightViewProjMatrices.subarray(i*16, (i+1)*16) is the
camera-view-space → cascade-i light-clip matrix.
Light view-projection matrix for the cascade currently being rendered, used by the shadow-depth technique which only ever processes one cascade per draw pass. Set by ShadowPipeline before each cascade's depth dispatch; ignored by shadow-aware color techniques (they read the array form, shadowLightViewProjMatrices).
One shadow-map depth texture per cascade (indices 0..shadowCascadeCount-1
are populated). Unused slots alias to cascade 0's texture so every sampler
in shadow-aware shaders has a valid binding. Null array entries indicate
shadows aren't in effect this frame.
Snap framebuffer size in pixels — the snap shaders use the ratio (drawingBufferSize / snapBufferSize) to convert a canvas-pixel offset into the matching offset on the small snap FBO, so the cursor's surroundings land flush against its edges.
Cursor position in clip space (range [-1, 1] on each axis), set
by the SnapManager before binding a snap technique. The
snap pass uses this to centre its viewport-remap helper on the
cursor — same shape as pickClipPos but kept separate so
pick and snap can run side by side without clobbering each other.
The next available texture unit to bind a texture to.
The Viewer.
The HTML canvas element used for WebGL rendering.
Represents the rendering context`.