Appearance
@tmrw-realityos/charm • Docs
@tmrw-realityos/charm / WebGPUPBRShaderBuilder
Class: WebGPUPBRShaderBuilder
Extends
WebGPUShaderBase
Constructors
new WebGPUPBRShaderBuilder()
new WebGPUPBRShaderBuilder(
shaderCache
):WebGPUPBRShaderBuilder
Parameters
• shaderCache: Cache
<WebGPUShader
>
Returns
Overrides
WebGPUShaderBase.constructor
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:64
Properties
name
readonly
name:string
Inherited from
WebGPUShaderBase.name
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUShaderBase.ts:14
Methods
computeFlags()
computeFlags(
renderable
):number
Parameters
• renderable: RenderableDescriptor
Returns
number
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:84
computeFlagsMaterial()
computeFlagsMaterial(
material
,UVChannelsFlags
):number
Parameters
• material: Material
• UVChannelsFlags: number
Returns
number
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:120
getFragmentShaderSource()
getFragmentShaderSource(
renderable
):string
Parameters
• renderable: RenderableDescriptor
Returns
string
Overrides
WebGPUShaderBase.getFragmentShaderSource
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:281
getHash()
getHash(
renderable
):string
Parameters
• renderable: RenderableDescriptor
Returns
string
Overrides
WebGPUShaderBase.getHash
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:69
getShader()
getShader(
device
,renderable
):WebGPUShader
Parameters
• device: GPUDevice
• renderable: RenderableDescriptor
Returns
Inherited from
WebGPUShaderBase.getShader
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUShaderBase.ts:24
getUvChannel()
getUvChannel(
textureinfo
):number
Parameters
• textureinfo: undefined
| TextureInfo
| MaterialNormalTextureInfo
| MaterialOcclusionTextureInfo
Returns
number
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:73
getVertexShaderSource()
getVertexShaderSource(
renderable
):string
Parameters
• renderable: RenderableDescriptor
Returns
string
Overrides
WebGPUShaderBase.getVertexShaderSource
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:187
hasUVChannel()
hasUVChannel(
flags
,channel
):boolean
checks if the flags that tells if a uv channel is present is true
Parameters
• flags: number
• channel: number
Returns
boolean
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:175
isTransmissive()
isTransmissive(
flags
):boolean
Parameters
• flags: number
Returns
boolean
Defined in
packages/charm/src/graphics/WebGPU/shaders/WebGPUPBRShaderBuilder.ts:183