Jump to content

PIXI filter rendering not correct, sprite disappears (Phaser only)


s4m_ur4i
 Share

Recommended Posts

Hello everyone,

The filter (PIXI JS) does not work correctly. It blures a whole iamge so that only the main color in it is shown
code and image :
 

var game = new Phaser.Game(1280, 720, Phaser.WEBGL, this, false, false),
		init = function(){};
init.prototype = {
	preload: function(){
    game.load.script('grayX', 'filters/tiltshiftfilterx.js');
		game.load.script('grayY', 'filters/tiltshiftfiltery.js');
		game.load.script('gray', 'filters/tilshiftfilter.js');

    game.load.image("test", "assets/test.png");
	},
	create: function(){

    var testSprite = game.add.sprite(0,0,'test');
    var tiltShift = new PIXI.TiltShiftFilter();

    console.log(tiltShift);

    tiltShift.blurnumber = 3;
    tiltShift.gradientBlur = 1500;

    testSprite.filters = [tiltShift];

	}
}
game.state.add('init', init);
game.state.start('init');

Works great in PIXI.JS standalone,
ORIGINAL POST IN PIXI.JS FORUM: 

 

Bildschirmfoto 2016-01-17 um 21.05.44.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...