I am attempting to make "pixelated" particles by placing a
Particles2D node inside of a custom
Viewport and setting its parent
ViewportContainer to stretch mode. Since the
Viewport will "pixelate" everything inside it, the particles will snap to the actual game pixels and produce the pixelated effect that I want. Here's a gif comparing normal particles (right) with the pixelated version (left).
This system works great except for one problem: non-local coords. While I'm not sure exactly why, my theory is that the global transform that the particles are supposed to use in non-local coords mode is actually the custom
Viewport itself, rather than the "root"
Viewport. Since the custom
Viewport is itself instanced in other nodes that want to use pixelated particles, the inner particles end up just following that viewport, rather than the "root" one that I want. Here's a gif demonstrating this effect. Note that both particle systems in this example are using non-local coords (regular on the right, pixelated on the left).
Is there a way to get the inner particles in the custom viewport to use the "root" viewport as the base of the global transform? Alternatively, if there are easier ways of pixelating particles in Godot than this I'm open to suggestions for that as well.
Thanks in advance for the help! You can find the project files here if you want to mess around with this yourself.