Skip to content

Commit

Permalink
Account for resolution scale in count calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Jan 12, 2025
1 parent 2e7678b commit acb42b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/effects/ScanlineEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export class ScanlineEffect extends Effect {
protected override onResolutionChange(): void {

const resolution = this.resolution;
this.input.uniforms.get("count")!.value = Math.round(resolution.height * this.density);
const f = this.density / (resolution.pixelRatio * resolution.scale);
this.input.uniforms.get("count")!.value = f * resolution.height;

}

Expand Down

0 comments on commit acb42b9

Please sign in to comment.