xgpu
Version:
XGPU is an extendable library for WebGPU that provides a higher-level, easy-to-use interface for building rendering engines or processing numeric data. It handles automatic data binding, buffer alignment, variable declarations in shaders, and more. XGPU i
15 lines (14 loc) • 560 B
JavaScript
// Copyright (c) 2023 Thomas Le Coz. All rights reserved.
// This code is governed by an MIT license that can be found in the LICENSE file.
import { BlendMode } from "./BlendMode";
export class AlphaBlendMode extends BlendMode {
constructor() {
super();
this.color.operation = "add";
this.color.srcFactor = "src-alpha";
this.color.dstFactor = "one-minus-src-alpha";
this.alpha.operation = "add";
this.alpha.srcFactor = "src-alpha";
this.alpha.dstFactor = "one-minus-src-alpha";
}
}