Skip to content

Documentation / scene / EnvShIBL

Class: EnvShIBL

Defined in: libs/scene/src/render/envlight.ts:158

IBL with SH based environment lighting

Extends

Constructors

Constructor

new EnvShIBL(radianceMap?, irradianceSH?, irradianceSHFB?, sheenRadianceMap?): EnvShIBL

Defined in: libs/scene/src/render/envlight.ts:206

Creates an instance of EnvIBL

Parameters

radianceMap?

TextureCube

The radiance map

irradianceSH?

GPUDataBuffer

The irradiance SH

irradianceSHFB?

FrameBuffer

sheenRadianceMap?

TextureCube

Returns

EnvShIBL

Overrides

EnvironmentLighting.constructor

Accessors

disposed

Get Signature

get disposed(): boolean

Defined in: libs/base/dist/index.d.ts:6107

Returns

boolean

Inherited from

EnvironmentLighting.disposed


radianceMap

Get Signature

get radianceMap(): TextureCube<unknown>

Defined in: libs/scene/src/render/envlight.ts:227

The radiance map

Returns

TextureCube<unknown>

Set Signature

set radianceMap(tex): void

Defined in: libs/scene/src/render/envlight.ts:230

Parameters
tex

TextureCube<unknown>

Returns

void


sheenRadianceMap

Get Signature

get sheenRadianceMap(): TextureCube<unknown>

Defined in: libs/scene/src/render/envlight.ts:234

The Charlie-filtered sheen radiance map

Returns

TextureCube<unknown>

Set Signature

set sheenRadianceMap(tex): void

Defined in: libs/scene/src/render/envlight.ts:237

Parameters
tex

TextureCube<unknown>

Returns

void


irradianceSH

Get Signature

get irradianceSH(): GPUDataBuffer<unknown>

Defined in: libs/scene/src/render/envlight.ts:241

The irradiance sh coeffecients

Returns

GPUDataBuffer<unknown>

Set Signature

set irradianceSH(value): void

Defined in: libs/scene/src/render/envlight.ts:244

Parameters
value

GPUDataBuffer<unknown>

Returns

void


irradianceSHFB

Get Signature

get irradianceSHFB(): FrameBuffer<unknown>

Defined in: libs/scene/src/render/envlight.ts:248

The irradiance sh coeffecients

Returns

FrameBuffer<unknown>

Set Signature

set irradianceSHFB(value): void

Defined in: libs/scene/src/render/envlight.ts:251

Parameters
value

FrameBuffer<unknown>

Returns

void


irradianceWindow

Get Signature

get irradianceWindow(): Vector3

Defined in: libs/scene/src/render/envlight.ts:255

The irradiance sh window

Returns

Vector3

Set Signature

set irradianceWindow(val): void

Defined in: libs/scene/src/render/envlight.ts:258

Parameters
val

Vector3

Returns

void

Methods

on()

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:630

IEventTarget.on

Type Parameters

K

K extends "dispose"

Parameters

type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

EnvironmentLighting.on


once()

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:634

IEventTarget.once

Type Parameters

K

K extends "dispose"

Parameters

type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

EnvironmentLighting.once


off()

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:638

IEventTarget.off

Type Parameters

K

K extends "dispose"

Parameters

type

K

listener?

EventListener<{ dispose: []; }>

context?

unknown

Returns

void

Inherited from

EnvironmentLighting.off


dispatchEvent()

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:642

IEventTarget.dispatchEvent

Type Parameters

K

K extends "dispose"

Parameters

type

K

args

...object[K]

Returns

void

Inherited from

EnvironmentLighting.dispatchEvent


dispose()

dispose(): void

Defined in: libs/base/dist/index.d.ts:6108

Returns

void

Inherited from

EnvironmentLighting.dispose


getType()

getType(): "ibl"

Defined in: libs/scene/src/render/envlight.ts:223

The environment light type

Returns

"ibl"

Overrides

EnvironmentLighting.getType


initShaderBindings()

initShaderBindings(pb, ctx?): void

Defined in: libs/scene/src/render/envlight.ts:265

Initialize shader bindings

Parameters

pb

ProgramBuilder

The program builder

ctx?

DrawContext

Returns

void

Overrides

EnvironmentLighting.initShaderBindings


updateBindGroup()

updateBindGroup(bg, ctx?): void

Defined in: libs/scene/src/render/envlight.ts:329

Updates the uniform values

Parameters

bg

BindGroup

The bind group to be updated

ctx?

DrawContext

Returns

void

Overrides

EnvironmentLighting.updateBindGroup


getRadiance()

getRadiance(scope, refl, roughness): PBShaderExp

Defined in: libs/scene/src/render/envlight.ts:395

Get radiance for a fragment

Parameters

scope

PBInsideFunctionScope

The shader scope

refl

PBShaderExp

Reflection vector

roughness

PBShaderExp

Surface roughness

Returns

PBShaderExp

The radiance for the fragment

Overrides

EnvironmentLighting.getRadiance


getSheenRadiance()

getSheenRadiance(scope, refl, roughness): PBShaderExp

Defined in: libs/scene/src/render/envlight.ts:409

Get Charlie-filtered sheen radiance for a fragment

Parameters

scope

PBInsideFunctionScope

The shader scope

refl

PBShaderExp

Reflection vector

roughness

PBShaderExp

Sheen roughness

Returns

PBShaderExp

The sheen radiance for the fragment

Overrides

EnvironmentLighting.getSheenRadiance


getIrradiance()

getIrradiance(scope, normal, ctx?): PBShaderExp

Defined in: libs/scene/src/render/envlight.ts:423

Get irradiance for a fragment

Parameters

scope

PBInsideFunctionScope

The shader scope

normal

PBShaderExp

surface normal

ctx?

DrawContext

Returns

PBShaderExp

The radiance for the fragment

Overrides

EnvironmentLighting.getIrradiance


hasRadiance()

hasRadiance(): boolean

Defined in: libs/scene/src/render/envlight.ts:830

Returns whether this environment lighting supports reflective light

Returns

boolean

Overrides

EnvironmentLighting.hasRadiance


hasSheenRadiance()

hasSheenRadiance(): boolean

Defined in: libs/scene/src/render/envlight.ts:837

Returns whether this environment lighting supports sheen reflective light

Returns

boolean

Overrides

EnvironmentLighting.hasSheenRadiance


hasIrradiance()

hasIrradiance(): boolean

Defined in: libs/scene/src/render/envlight.ts:844

Returns whether this environment lighting supports diffuse light

Returns

boolean

Overrides

EnvironmentLighting.hasIrradiance


onDispose()

protected onDispose(): void

Defined in: libs/scene/src/render/envlight.ts:851

Disposes the object and releases all GPU resources

Returns

void

Overrides

EnvironmentLighting.onDispose

Released under the MIT License.