Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
but0n committed Mar 18, 2019
1 parent b49762f commit 3afc285
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
gltf = assetRoot + 'gltfsamples/FlightHelmet/glTF/FlightHelmet.gltf';
// gltf = assetRoot + 'res/CesiumMan.glb';
// gltf = assetRoot + 'res/BrainStem.glb';
// gltf = assetRoot + 'gltfsamples/DamagedHelmet.glb';
gltf = assetRoot + 'gltfsamples/DamagedHelmet.glb';
// gltf = assetRoot + 'res/MorphPrimitivesTest.glb';
// gltf = assetRoot + 'gltfsamples/project_polly.glb';
// gltf = assetRoot + 'gltfsamples/Suzanne/Suzanne.gltf';
Expand All @@ -44,10 +44,11 @@

let screen = new Screen('#screen');
screen.bgColor = [0.2,0.2,0.2, 1];
screen.bgColor = [0.9,0.9,0.9,1];
screen.bgColor = [0, 0, 0, 1];
// screen.bgColor = [0.9,0.9,0.9,1];
// Filters
Bloom.initFilters(screen, threshold || 0.4, radiu || 80, intensity || 1.2);
screen.attachFilter(new Vignetting(screen));
Bloom.initFilters(screen, threshold || 0.8, radiu || 80, intensity || 1.2);
// screen.attachFilter(new Vignetting(screen));

// let loading = new loadingAnim(screen);
// loading.cb = () => {
Expand Down
6 changes: 3 additions & 3 deletions src/filter/bloom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export class Bloom {
let height = screen.height;

let pass = [];
radius = 1 * screen.ratio;
let core = 2;
intensity = 1.0;
radius = 1.0 * screen.ratio;
let core = 3;
intensity = 2.0;
// while (width > 60 || height > 60) {
while (core--) {
const nw = Math.floor(width * 0.5);
Expand Down

0 comments on commit 3afc285

Please sign in to comment.