Sign in to follow this  
s4m_ur4i

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

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.