Editor.Assets.PassConfiguration
ClassPlain configuration object describing a Pass asset, blend mode, and shader defines to apply to a PassInfo via setPassConfiguration.
Index
Properties
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?
optionalblendMode?:BlendMode
Optional blend mode applied to color output when this configuration is set on a PassInfo.
defines?
optionaldefines?:any
Optional list of shader defines (string[]) applied to the pass when this configuration is set on a PassInfo.
pass?
optionalpass?:Pass
Optional Pass asset that the target PassInfo should use.