Skip to content

Documentation / device / PBScope

Class: PBScope ​

Defined in: libs/device/src/builder/programbuilder.ts:2865

Base class for scope of the shader program

Extends ​

Extended by ​

Indexable ​

[props: string]: any

Accessors ​

$thisProxy ​

Get Signature ​

get $thisProxy(): T

Defined in: libs/device/src/builder/base.ts:133

Returns ​

T

Inherited from ​

Proxiable.$thisProxy


$builder ​

Get Signature ​

get $builder(): ProgramBuilder

Defined in: libs/device/src/builder/programbuilder.ts:2884

Get the program builder

Returns ​

ProgramBuilder


$builtins ​

Get Signature ​

get $builtins(): PBBuiltinScope

Defined in: libs/device/src/builder/programbuilder.ts:2888

Returns the scope of the builtin variables

Returns ​

PBBuiltinScope


$inputs ​

Get Signature ​

get $inputs(): PBInputScope

Defined in: libs/device/src/builder/programbuilder.ts:2892

Returns the scope of the input variables

Returns ​

PBInputScope


$outputs ​

Get Signature ​

get $outputs(): PBOutputScope

Defined in: libs/device/src/builder/programbuilder.ts:2896

Returns the scope of the output variables

Returns ​

PBOutputScope


$l ​

Get Signature ​

get $l(): PBLocalScope

Defined in: libs/device/src/builder/programbuilder.ts:2924

Get the current local scope

Returns ​

PBLocalScope


$g ​

Get Signature ​

get $g(): PBGlobalScope

Defined in: libs/device/src/builder/programbuilder.ts:2928

Get the global scope

Returns ​

PBGlobalScope

Methods ​

$getVertexAttrib() ​

$getVertexAttrib(semantic): PBShaderExp

Defined in: libs/device/src/builder/programbuilder.ts:2920

Get the input vertex attribute by specified semantic

Parameters ​

semantic ​

VertexSemantic

The vertex semantic

Returns ​

PBShaderExp

The input vertex attribute or null if not exists

Remarks ​

Can only be called only in vertex shader


$query() ​

$query(name): PBShaderExp

Defined in: libs/device/src/builder/programbuilder.ts:2946

Query the global variable by the name

Parameters ​

name ​

string

Name of the variable

Returns ​

PBShaderExp

The variable or null if not exists

Released under the MIT License.