Skip to main content

Editor.Assets.PassConfiguration

Class

Plain configuration object describing a Pass asset, blend mode, and shader defines to apply to a PassInfo via setPassConfiguration.

Index

Example

// Switch a material pass to additive blending and set its shader defines in one update.
// setPassConfiguration applies all assigned fields together, so the shader is reparsed once.
// `pass` is left unset, so the pass keeps its current shader.
export function makeAdditive(passInfo: Editor.Assets.PassInfo, defines: string[]): void {
const config = new Editor.Assets.PassConfiguration();
config.blendMode = Editor.Assets.BlendMode.Add;
config.defines = defines;
passInfo.setPassConfiguration(config);
}

Constructors

Constructor

new PassConfiguration(): PassConfiguration

Constructs a new empty PassConfiguration; assign the pass, blendMode, and defines fields before passing it to PassInfo.setPassConfiguration.

Returns

PassConfiguration

Properties

blendMode?

optional blendMode?: BlendMode

Optional blend mode applied to color output when this configuration is set on a PassInfo.


defines?

optional defines?: any

Optional list of shader defines (string[]) applied to the pass when this configuration is set on a PassInfo.


pass?

optional pass?: Pass

Optional Pass asset that the target PassInfo should use.