Gets if IBL is currently applied.
This is true when View.renderMode is
in IBL.renderModes.
InternalThe decoded HDR environment currently driving IBL, if any. Holds row-major top-down Float32 RGBA pixels (linear-space) plus the source dimensions. Mutually exclusive with environmentImage — at most one slot is populated at a time.
The decoded environment image currently driving IBL, if any.
The URL the environment was loaded from, if any. Empty string when the image was supplied directly via setEnvironmentImage.
InternalMonotonically-increasing version number, bumped each time the environment image changes. Renderers compare against their own last-seen value to detect changes — an integer beats hashing the image bytes every frame.
Gets the cubemap IBL contribution multiplier.
Sets the cubemap IBL contribution multiplier. Range [0, ∞). At
0 the cubemap contributes nothing even when the active
View.renderMode is in IBL.renderModes.
Default value is 1.4 — a modest boost over the natural 1.0
level so RealisticRender's prefiltered-cubemap fill reads as
distinctly brighter than the analytical hemisphere fill in
NavigationRender / DetailedRender.
Gets which rendering modes in which to apply IBL.
The View will apply IBL whenever View.renderMode has been set one of these values.
Default value is [DetailedRender, RealisticRender].
Sets which rendering modes in which to apply IBL.
The View will apply IBL whenever View.renderMode has been set one of these values.
Default value is [DetailedRender, RealisticRender].
Drops any user-supplied environment image and reverts to the procedural sky. Cheap; the renderer detaches the equirect texture on the next frame.
Replaces the procedural sky with an equirectangular environment
image fetched from url. Once loaded, the renderer projects it
onto the IBL source cubemap and runs the same prefilter /
irradiance pipeline as the procedural sky — so the BRDF picks up
real environment reflections on metals and the diffuse ambient
term reflects the actual scene context.
Resolves with { ok: true } once the image has loaded and the
renderer has been notified. Rejects with { ok: false } on
fetch / decode failure.
Pass any URL form — http(s):, blob:, data:. Cross-origin
URLs need CORS headers from the host or the GPU upload will throw
a SecurityError.
Replaces the procedural sky with a Radiance HDR (.hdr) file
fetched from url. Same effect as setEnvironment but the
environment is uploaded as RGBA16F so super-bright pixels
(the sun, sky-glow) survive the prefilter at full intensity, giving
smooth metals a proper HDR specular bloom under tonemapping.
Resolves with { ok: true } once the file has fetched and decoded.
Rejects on network failure or malformed .hdr contents.
Pass any URL form — http(s):, blob:, data:. Cross-origin URLs
need CORS headers from the host.
Replaces the procedural sky with a Radiance HDR file already
fetched into an ArrayBuffer. Same effect as setEnvironmentHDR
but synchronous — useful when the caller has already produced the
bytes (bundler import, IndexedDB, etc.).
Replaces the procedural sky with an already-decoded equirectangular
environment image. Same effect as setEnvironment but
synchronous — useful when the caller has already produced a canvas
or ImageBitmap (for example, from a bundled PNG or a
createImageBitmap decode).
Configures cubemap-based image-based lighting (IBL) for a View.
Drives the prefiltered-cubemap diffuse + specular contribution to each fragment's BRDF: the renderer projects either a procedural sky (built from Lights.hemispheric) or a user-supplied equirectangular environment image onto a cubemap, then prefilters the diffuse irradiance and GGX-convolved specular for fast lookup at draw time. Active whenever the current View.renderMode is in IBL.renderModes.
The cheap analytical sky/ground/up gradient lives separately on Lights.hemispheric — it applies in every render mode by default and stacks with this cubemap path when both are enabled.
See @xeokit/sdk/viewing/viewer for usage info.