Hi everyone,
I’m trying to use a shader to display an animation in Phaser 3 instead of using the built-in animation system. My goal is to render frames from a texture atlas the same as phaser does.
I found an issue in my current approach, and I need help fixing it. Here’s the sandbox link:
What I’m Trying to Achieve:
- Display an animation using a shader instead of
Phaser.Animations.Animation
. - Select frames from a texture atlas based on time, ensuring smooth animation playback.
The Issue:
- The animation does not play correctly: some frame position is miss 1-2 pixels (The left knight in scene rendered by phaser and the right one is output of the shader for easy compare).
I’d really appreciate any insights or fixes! Thanks in advance.