How to use blendMode divide width PIXI.js?

926 views Asked by At

I would like to use the divide blendMode in PIXI.js. How to do it?

I've tried all the other blendModes availables but none were good enough for the effect I'm trying to make. https://i.stack.imgur.com/YlqVm.jpg

Using the phaser based on pixi.js:

base = game.add.sprite(350, 350, 'base');
base.anchor.set(0.5);
base.tint = '0x7f4f2c';
blur = game.add.sprite(350, 350, 'blur');
blur.anchor.set(0.5);
blur.blendMode = PIXI.blendModes.DIVIDE; // Of course it doesn't work because pixi doesn't have it
1

There are 1 answers

0
Bit Planets On BEST ANSWER

I somehow tried to inverse the image and use the COLOR_DODGE blend mode which is available in pixi and it worked. This is a just very lucky. The effect is not 100% equal, but very close and good enough in this case.