Thanks for that. I've tried to follow your suggestion but I'm not getting the results I expected. I'm not sure what I'm doing wrong.
export default class MyFilter extends Filter {
constructor() {
super();
this.blurFilter = new BlurFilter(10);
this.colorMatrixFilter = new ColorMatrixFilter();
this.colorMatrixFilter.matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, -2];
}
apply(filterManager, input, output, clearMode) {
const renderTarget = filterManager.getFilterTexture();
this.blurFilter.apply(filterManager, input, renderTarget, CLEAR_MODES.CLEAR);
this.colorMatrixFilter.apply(filterManager, renderTarget, output, CLEAR_MODES.BLEND);
super.apply(filterManager, input, output, CLEAR_MODES.BLEND);
filterManager.returnFilterTexture(renderTarget);
}
}
This line seems to be the problem. When I comment it out, I kind of get the results I want but the original graphics are not on top.
super.apply(filterManager, input, output, CLEAR_MODES.BLEND);