mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-07 00:10:09 +01:00
It turns out using a TextureRect node isn't necessary :) The typical ViewportContainer + Viewport setup can be used just fine to enable filtering on the ViewportTexture returned by the Viewport. The performance of the new method is equivalent to the old one.
3D Viewport Scaling
This demo shows how to scale the 3D viewport rendering without affecting 2D elements such as the HUD. It also demonstrates how to toggle filtering on a viewport. This technique can be useful in 2D games as well. For instance, it can be used to have a "pixel art" viewport for the main game area and a non-pixel-art viewport for HUD elements.
Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/586

