Skip to main content

LensStudio:AssetUtils.js.addGraphToMaterial

Function

Adds a pass to the given material and optionally adds define strings to the pass.

addGraphToMaterial(material, pass, addDefineStrings?): PassInfo

Adds a pass to the given material and optionally adds define strings to the pass.

Parameters

ParameterTypeDescription
materialMaterialThe material to which the pass will be added.
passPassThe pass to be added to the material.
addDefineStrings?string[]An optional array of define strings to be added to the pass. Defaults to ['ENABLE_BASE_TEX'].

Returns

PassInfo

The pass information after adding the pass and define strings.