I’m trying to make a background GIF texture using class AnimatedGifTexture extends BaseTexture
-
Layer looks like a good choice but it only accepts
Textures
so it wont work. -
I’m also trying
ImageFilter
but it will only overlay and not operate as a background.
const engine = scene.getEngine()
const gifTexture = new AnimatedGifTexture("gif/cyberpunk_city.gif", scene.getEngine(), () => {
console.log("Loaded gif")
});
const customFilter = new ImageFilter(engine);
// Create a pass through post process
const passPostProcess = new PassPostProcess("bw", 1, undefined, undefined, engine);
return {
onRender: () => {
customFilter.render(gifTexture, passPostProcess)
}
}
- I don’t think drawing to a plane is a good solution and it gets transformed by the camera positioning.
Question: How can I get AnimatedGifTexture
to run as a full screen background?