Closed JuhBoyBet closed 1 year ago
From the fragment shader docs: "Some APIs, such as Canvas.drawImage, ignore the value of the shader."
ouch, i didn't catch that line, sorry. Well, as far as i know renderRect and stuff works with drawImage so .. I suppose it will be complicated to apply FShader on it. Maybe my solution is to use drawRect and set uniform & sampler2D to get the fragment working. But it reduce my opportunity to works with most of the library in place - like animations.
Thanks for your fast answer anyway, i see that it's not planned for now so i'll find another way to do it.
Thanks for your fast answer anyway, i see that it's not planned for now so i'll find another way to do it.
Not planned from our end, but Flutter will most definitely improve on this in the long run, it's not much we can do from the Flame side except waiting.
Np, understood ! Thanks for your time 🙏
Current bug behavior
I use the SpriteAnimation with a custom Fragment shader written in GLSL. To render it I use the 'renderRect' method but the fragment have no effect on the image. I tried to directly use the 'canvas.drawImage' api but the result is the same, the fragment shader is not used. However, it works well on api like 'canvas.drawCircle'.
Expected behavior
The fragment shader should be used to apply transformation on the sprite.
Steps to reproduce
Flutter doctor output
More environment information
Thanks & have a good day. PS: I could work on this, but i need some insight on where to dig first.