Filter doesn't work
kareljuricka opened this issue · comments
I'm not sure, what I'm doing wrong but I can't get any custom filter to work. Build-in filters work correctly.
Link to reproduce:
https://stackblitz.com/edit/typescript-qu4egd?file=index.ts
No errors in console..
Thanks for any advice..
Adding a Ticker fixes the problem or using Renderer's prepare
plugin. Even though your image is downloaded (with onload
), it needs to be uploaded to the GPU, which can take about frame or so.
Use Ticker
const ticker = new PIXI.Ticker();
ticker.add(() => renderer.render(container));
Use Prepare
renderer.plugins.prepare.upload(sprite, () => {
renderer.render(container);
});
@bigtimebuddy thanks for tips
I don't like Ticker solution due to need to start a Ticker timer.
So I tried to make it work with prepare solution, but with no luck. I updated stackbliz, please look if you can help me with what I'm doing wrong. Callback is called but nothing is rendered..
https://stackblitz.com/edit/typescript-qu4egd?file=index.ts
Call render once before doing the upload. I this this maybe a bug, but I'll look into it.