Javascript 相位器/Pixi正常映射过滤器不工作

Javascript 相位器/Pixi正常映射过滤器不工作,javascript,webgl,phaser-framework,pixi.js,Javascript,Webgl,Phaser Framework,Pixi.js,我正在尝试将法线贴图应用于Phaser精灵,但在Phaser 2.1.1(Pixi 1.6.1)中出现以下WebGL错误: 这是我的密码: preload: function () { game.load.script('normal', './js/NormalMapFilter.js'); game.load.image('cardfront', './img/sample-front.png'); game.load.image('cardnormal', './img

我正在尝试将法线贴图应用于Phaser精灵,但在Phaser 2.1.1(Pixi 1.6.1)中出现以下WebGL错误:

这是我的密码:

preload: function () {
  game.load.script('normal',   './js/NormalMapFilter.js');

  game.load.image('cardfront',  './img/sample-front.png');
  game.load.image('cardnormal', './img/sample-front-norm.jpg');
},

create: function() {
  this.cardfrontnorm = PIXI.Texture.fromImage('cardnormal');
  this.normalmap = new PIXI.NormalMapFilter(this.cardfrontnorm);

  this.card = game.add.sprite(game.width / 2, game.height / 2, 'cardfront');
  this.card.filters = [this.normalmap];
}
精灵图像和法线贴图都是512x512


任何帮助都将不胜感激,谢谢

显然,NormalMapFilter是一个实验,从未打算引入到库中:

但是,您可以尝试在此处使用照明插件:

如果您可以将其发布在JSFIDLE或类似的网站上,我会检查是否得到相同的信息error@imcg不幸的是,这有点困难,因为CORS限制和通过js加载的资产。我也有同样的问题。你设法解决了吗?
preload: function () {
  game.load.script('normal',   './js/NormalMapFilter.js');

  game.load.image('cardfront',  './img/sample-front.png');
  game.load.image('cardnormal', './img/sample-front-norm.jpg');
},

create: function() {
  this.cardfrontnorm = PIXI.Texture.fromImage('cardnormal');
  this.normalmap = new PIXI.NormalMapFilter(this.cardfrontnorm);

  this.card = game.add.sprite(game.width / 2, game.height / 2, 'cardfront');
  this.card.filters = [this.normalmap];
}