For reference, this is the effect I'm trying to create.
Here's the minimal working GitHub repository to replicate the problem.
The reason this doesn't work in my game right now is the camera moves with the player. Meaning that (due to 3d physics and the fact the player occupies space between pixels) I need to translate the camera to a place where all 3d objects (sprites) will render the same without jitter. I'm getting close but I'm not quite there.
Here are the camera settings.
Here's my proposed solution:
- Attach Camera to the Player (which moves in subpixel 3d space).
- Create a script for all movable objects and the camera to "snap pixel" offset the sprite/camera relative to the parent given the global transform of the parent. Static objects don't need this because they'll be adjusted via adjusting the camera.
- Render w/ size 360x240.
The code formatting is bad in Godot. But the relevant script can be found here.
I'm extremely close with this solution, but there's still jitter on static non-moving 3d objects in my scene. I'm wondering if there's a better way to do this or if I'm fighting an unwinnable battle. It seems like if you can do it in Unity, you should be able to do it in Godot too.