mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Set missing uniforms to get FX working again :)
This commit is contained in:
parent
ed5c44a65e
commit
52619b26f9
2 changed files with 13 additions and 0 deletions
|
@ -243,7 +243,11 @@ var PostFXPipeline = new Class({
|
|||
this.halfFrame1 = utility.halfFrame1;
|
||||
this.halfFrame2 = utility.halfFrame2;
|
||||
|
||||
var renderer = this.renderer;
|
||||
|
||||
this.set1i('uMainSampler', 0);
|
||||
this.set2f('uResolution', renderer.width, renderer.height);
|
||||
this.set1i('uRoundPixels', renderer.config.roundPixels);
|
||||
|
||||
var targets = this.renderTargets;
|
||||
|
||||
|
|
|
@ -254,6 +254,9 @@ var PreFXPipeline = new Class({
|
|||
|
||||
// So calls to set uniforms in onPreRender target the right shader:
|
||||
this.currentShader = this.copyShader;
|
||||
|
||||
this.set2f('uResolution', renderer.width, renderer.height);
|
||||
this.set1i('uRoundPixels', renderer.config.roundPixels);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -366,6 +369,8 @@ var PreFXPipeline = new Class({
|
|||
this.setShader(this.drawSpriteShader);
|
||||
|
||||
this.set1i('uMainSampler', 0);
|
||||
this.set2f('uResolution', renderer.width, renderer.height);
|
||||
this.set1i('uRoundPixels', renderer.config.roundPixels);
|
||||
|
||||
this.flipProjectionMatrix(true);
|
||||
|
||||
|
@ -508,7 +513,11 @@ var PreFXPipeline = new Class({
|
|||
|
||||
shader.bind(wasBound, false);
|
||||
|
||||
var renderer = this.renderer;
|
||||
|
||||
this.set1i('uMainSampler', 0);
|
||||
this.set2f('uResolution', renderer.width, renderer.height);
|
||||
this.set1i('uRoundPixels', renderer.config.roundPixels);
|
||||
|
||||
sprite.preFX.onFXCopy(this);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue