Skip to content

Documentation / scene / IMixinPBRCommon

Type Alias: IMixinPBRCommon ​

IMixinPBRCommon = object & TextureMixinInstanceTypes<["occlusion", "emissive", "sheenColor", "sheenRoughness", "clearcoatIntensity", "clearcoatRoughness", "clearcoatNormal", "transmission", "thickness", "iridescence", "iridescenceThickness"]> & IMixinPBRBRDF

Defined in: libs/scene/src/material/mixins/pbr/common.ts:29

Interface for common PBR mixin

Type Declaration ​

ior ​

ior: number

emissiveColor ​

emissiveColor: Vector3

emissiveStrength ​

emissiveStrength: number

emissiveLuminance ​

emissiveLuminance: number

emissiveExposureWeight ​

emissiveExposureWeight: number

occlusionStrength ​

occlusionStrength: number

rectSpecularScale ​

rectSpecularScale: number

transmission ​

transmission: boolean

transmissionFactor ​

transmissionFactor: number

thicknessFactor ​

thicknessFactor: number

attenuationColor ​

attenuationColor: Vector3

attenuationDistance ​

attenuationDistance: number

sheen ​

sheen: boolean

sheenColorFactor ​

sheenColorFactor: Vector3

sheenRoughnessFactor ​

sheenRoughnessFactor: number

clearcoat ​

clearcoat: boolean

clearcoatIntensity ​

clearcoatIntensity: number

clearcoatRoughnessFactor ​

clearcoatRoughnessFactor: number

iridescence ​

iridescence: boolean

iridescenceFactor ​

iridescenceFactor: number

iridescenceIor ​

iridescenceIor: number

iridescenceThicknessMin ​

iridescenceThicknessMin: number

iridescenceThicknessMax ​

iridescenceThicknessMax: number

getCommonData() ​

getCommonData(scope, albedo, normal, viewVec, TBN): PBShaderExp

Parameters ​

scope ​

PBInsideFunctionScope

albedo ​

PBShaderExp

normal ​

PBShaderExp

viewVec ​

PBShaderExp

TBN ​

PBShaderExp

Returns ​

PBShaderExp

calculateCommonData() ​

calculateCommonData(scope, albedo, normal, viewVec, TBN, data): void

Parameters ​

scope ​

PBInsideFunctionScope

albedo ​

PBShaderExp

normal ​

PBShaderExp

viewVec ​

PBShaderExp

TBN ​

PBShaderExp

data ​

PBShaderExp

Returns ​

void

getCommonDatasStruct() ​

getCommonDatasStruct(scope): ShaderTypeFunc

Parameters ​

scope ​

PBInsideFunctionScope

Returns ​

ShaderTypeFunc

calculateEmissiveColor() ​

calculateEmissiveColor(scope): PBShaderExp

Parameters ​

scope ​

PBInsideFunctionScope

Returns ​

PBShaderExp

getF0() ​

getF0(scope): PBShaderExp

Parameters ​

scope ​

PBInsideFunctionScope

Returns ​

PBShaderExp

getSheenAlbedoScaling() ​

getSheenAlbedoScaling(scope, Ndot, sheenColor, sheenRoughness): PBShaderExp

Parameters ​

scope ​

PBInsideFunctionScope

Ndot ​

PBShaderExp

sheenColor ​

PBShaderExp

sheenRoughness ​

PBShaderExp

Returns ​

PBShaderExp

getSheenAlbedoScalingForDirect() ​

getSheenAlbedoScalingForDirect(scope, NoV, NoL, sheenColor, sheenRoughness): PBShaderExp

Parameters ​

scope ​

PBInsideFunctionScope

NoV ​

PBShaderExp

NoL ​

PBShaderExp

sheenColor ​

PBShaderExp

sheenRoughness ​

PBShaderExp

Returns ​

PBShaderExp

directLighting() ​

directLighting(scope, lightDir, lightColor, normal, viewVec, commonData, diffuseScale, specularScale, sourceRadiusFactor, outColor): void

Parameters ​

scope ​

PBInsideFunctionScope

lightDir ​

PBShaderExp

lightColor ​

PBShaderExp

normal ​

PBShaderExp

viewVec ​

PBShaderExp

commonData ​

PBShaderExp

diffuseScale ​

PBShaderExp

specularScale ​

PBShaderExp

sourceRadiusFactor ​

PBShaderExp

outColor ​

PBShaderExp

Returns ​

void

directRectLight() ​

directRectLight(scope, worldPos, normal, viewVec, commonData, posRange, axisX, axisY, colorIntensity, outColor): void

Parameters ​

scope ​

PBInsideFunctionScope

worldPos ​

PBShaderExp

normal ​

PBShaderExp

viewVec ​

PBShaderExp

commonData ​

PBShaderExp

posRange ​

PBShaderExp

axisX ​

PBShaderExp

axisY ​

PBShaderExp

colorIntensity ​

PBShaderExp

outColor ​

PBShaderExp

Returns ​

void

indirectLighting() ​

indirectLighting(scope, normal, viewVec, commonData, outColor, outRoughness?, outDiffuseColor?): void

Parameters ​

scope ​

PBInsideFunctionScope

normal ​

PBShaderExp

viewVec ​

PBShaderExp

commonData ​

PBShaderExp

outColor ​

PBShaderExp

outRoughness? ​

PBShaderExp

outDiffuseColor? ​

PBShaderExp

Returns ​

void

Released under the MIT License.