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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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