Skip to content

Commit

Permalink
minor-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
perminder-17 committed Dec 11, 2024
1 parent 6978551 commit d45c50f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/image/filterRenderer2D.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,14 @@ class FilterRenderer2D {
_renderPass() {
const gl = this.gl;
this._shader.bindShader();

const pixelDensity = this.pInst._renderer.pixelDensity ? this.pInst._renderer.pixelDensity() : 1;
const pixelDensity = this.pInst.pixelDensity ? this.pInst.pixelDensity() : 1;

const texelSize = [
1 / (this.pInst.width * pixelDensity),
1 / (this.pInst.height * pixelDensity)
];

const canvasTexture = new Texture(this._renderer, this.pInst._renderer.wrappedElt);
const canvasTexture = new Texture(this._renderer, this.pInst.wrappedElt);

// Set uniforms for the shader
this._shader.setUniform('tex0', canvasTexture);
Expand Down

0 comments on commit d45c50f

Please sign in to comment.