Skip to content

Commit

Permalink
Updated Bloom Filter (Still not working properly)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbazukun123 committed Dec 29, 2023
1 parent e5425d1 commit 3797ca2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions filters/bloom/src/BloomFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,12 @@ export class BloomFilter extends AlphaFilter
*/
public override apply(filterManager: FilterSystem, input: Texture, output: RenderSurface, clear: boolean): void
{
const tempTexture = TexturePool.getSameSizeTexture(input);
const tempTexture2 = TexturePool.getSameSizeTexture(input);
const renderTarget = TexturePool.getSameSizeTexture(input);

filterManager.applyFilter(this, input, tempTexture, false);
filterManager.applyFilter(this._blurXFilter, tempTexture, tempTexture2, false);
filterManager.applyFilter(this._blurYFilter, tempTexture2, output, clear);

TexturePool.returnTexture(tempTexture);
TexturePool.returnTexture(tempTexture2);
filterManager.applyFilter(this, input, output, clear);
filterManager.applyFilter(this._blurXFilter, input, renderTarget, true);
filterManager.applyFilter(this._blurYFilter, renderTarget, output, false);
TexturePool.returnTexture(renderTarget);
}

/**
Expand Down

0 comments on commit 3797ca2

Please sign in to comment.