问题描述:

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. http://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

网友答案:

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.

相关阅读:
Top