Weird behavior with Flame Shaders compared to pure flutter shader
What happened?
Trying to use a shader that works in pure Flutter, it doesn't in Flame. My picture gets scaled down and asymmetrically deformed. This might be simply something I don't understand with how to pass data to the shader in Flame, or a bug, I'm unsure.
What do you expect?
I'm trying to reproduce the same behavior in pure flutter and in Flame, On the right the expected result and on the left the one I'm getting with Flame.
How can we reproduce this?
I made a public repo to work on the issue you can take a look at https://github.com/stilnat/shader-flame-test
What steps should take to fix this?
I don't know at all
updated the issue to add a public repository with an example showing the issue
I have some update on this, in the shader, setting
vec3 col = texture(uTexture, uv * 0.5 + vec2(0, 0.5)).rgb;
Instead of vec3 col = texture(uTexture, uv).rgb
Will give the proper result, I can't explain why though.
@renancaraujo maybe you would know?