Initial
This commit is contained in:
40
resources/app/client/pixi/webgl/extensions/blend-modes.js
Normal file
40
resources/app/client/pixi/webgl/extensions/blend-modes.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const BLEND_MODES = {};
|
||||
|
||||
/**
|
||||
* A custom blend mode equation which chooses the maximum color from each channel within the stack.
|
||||
* @type {number[]}
|
||||
*/
|
||||
BLEND_MODES.MAX_COLOR = [
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.MAX,
|
||||
WebGL2RenderingContext.MAX
|
||||
];
|
||||
|
||||
/**
|
||||
* A custom blend mode equation which chooses the minimum color from each channel within the stack.
|
||||
* @type {number[]}
|
||||
*/
|
||||
BLEND_MODES.MIN_COLOR = [
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.MIN,
|
||||
WebGL2RenderingContext.MAX
|
||||
];
|
||||
|
||||
/**
|
||||
* A custom blend mode equation which chooses the minimum color for color channels and min alpha from alpha channel.
|
||||
* @type {number[]}
|
||||
*/
|
||||
BLEND_MODES.MIN_ALL = [
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.ONE,
|
||||
WebGL2RenderingContext.MIN,
|
||||
WebGL2RenderingContext.MIN
|
||||
];
|
||||
Reference in New Issue
Block a user