Set missing uniforms to get FX working again :)

This commit is contained in:
Richard Davey 2023-11-07 22:51:38 +00:00
parent ed5c44a65e
commit 52619b26f9
2 changed files with 13 additions and 0 deletions

View file

@ -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;

View file

@ -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);