Godot Version
Godot Version 4.3
Question
I had a similar problem as this post here on the forums: Exclude sprite from viewport pixel effect
The main gist of it as that I use Sprite3D’s to visualize characters, and pixelating the viewport would cause the pixel-art Sprite3D’s to also be scaled down, which is a huugggee no no.
Eventually I found the same solution as the previous post, rendering pixelated and non-pixelated objects to separate viewports and layering them accordingly. However, this causes a huge issue with all non-pixelated objects being rendered above all pixelated objects.
As seen in the first image below, a Sprite3D is submerged in a water and is visualized as expected.
As seen in the second image, when using the sub viewports to prevent pixelation, this causes the Sprite3D to always be displayed above the water, regardless of it being submerged or not. Same for the dummy sprite, which is visible through the terrain.
My main question is, how can the pixelation / non-pixelation effect be applied whilst having the expected rendering of image 1? I have yet to fully learn how rendering fully works in Godot and would appreciate any help regarding this. From what I understand, the use of layered sub-viewports would never actually work. If more information is needed, please let me know.
Here is the scene tree that I currently have: