I’m trying to prefilter a texture through a fragment shader, as in the flow goes like this:
- Load texture:
const texture = new Texture(url...);
- Apply glsl based custom filter to the texture:
const filteredTexture = ??(Render to rendertarget, create new texture from it)
- And then dispose original texture and pass filtered texture to be used by a material.
With my attempts so far I have came across
EffectWrapper etc. but it seems like I’m getting deeper into Babylon.js internals and it still isn’t quite working yet. So I’m wondering if I’m either missing an existing util to do this or maybe there is a Playground example somewhere to use as reference?