Godot Version
Godot Engine v4.4.1.stable.mono.official [49a5bc7b6]
Question
Hi everyone, I have an issue with UI text in my godot4 2d game.
UI Text Becomes Pixelated When Resizing Window with SubViewport Setup for Local Splitscreen
Setup
I’m using SubViewports for local splitscreen multiplayer. Each player gets a SubViewport with a Camera2D and CanvasLayer for UI. The Level (which contains the UI node) is attached to the first viewport.
Node Hierarchy (here for 1 player for visibility)
root
├── ItemDatabase
├── MultiplayerState
└── Game
└── SplitScreenManager
└── ViewportRow
└── ViewportContainer1
└── Viewport1
├── Camera2D1
├── CanvasLayer1 (UI layer for player 1)
└── Level
├── Timer
├── Ui (the UI scene which contains the pixelated text)
└── Players
The Issue
When I embed my game under a SubViewport for local splitscreen multiplayer, the UI, especially the text, becomes all pixelated when I resize the window. This does NOT happen without the viewport setup.
What I’ve Tried
- Set
SubViewport.CanvasItemDefaultTextureFiltertoViewport.DefaultCanvasItemTextureFilter.Nearest - Set
SubViewportContainer.TextureFiltertoTextureFilterEnum.Nearest
Question
What else should I check for crisp UI/text rendering when resizing SubViewports? Are there settings, canvas layer properties, or viewport scaling settings I’m missing?