Skip to content

Commit

Permalink
tiles: base blur is proportial to image size
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Apr 23, 2023
1 parent acd06bf commit 3e438d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/adapters/EquirectangularAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class EquirectangularAdapter extends AbstractAdapter<string, Texture> {
const ctx = buffer.getContext('2d');

if (this.config.blur) {
ctx.filter = 'blur(1px)';
ctx.filter = `blur(${buffer.width / 2048}px)`;
}

ctx.drawImage(
Expand Down
2 changes: 1 addition & 1 deletion packages/cubemap-adapter/src/CubemapAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class CubemapAdapter extends AbstractAdapter<CubemapPanorama, Texture[]>
const ctx = buffer.getContext('2d');

if (this.config.blur) {
ctx.filter = 'blur(1px)';
ctx.filter = `blur(${buffer.width / 512}px)`;
}

ctx.drawImage(img, 0, 0, buffer.width, buffer.height);
Expand Down

0 comments on commit 3e438d9

Please sign in to comment.