-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect 2D SubViewport scaling behavior #82708
Comments
Please remove the .godot folder when submitting MRPs, also your script does a bunch of redundant stuff which makes it very hard to understand what you want to do. What I'm seeing is that the behavior between the editor and the game is not inconsistent, because your script increases the viewport container's size at runtime. If you were to do that in the editor, you get the same result. I managed to do what you want (I think) using The integer scaling solution on the project settings is applied only to the root
TLDR: There is no bug here, yes, it's impossible to do it with |
Here is a more minimal project that demonstrates the problem, then. I will update the OP. Thank you for including a workaround solution, but I don't think it is a good enough replacement. ViewportTexture doesn't allow for the straightforward use of mouse inputs or sound, which is a major drawback.
If this is not considered a bug, then I will be opening a proposal. |
This is an issue related to the forward_plus renderer. @akien-mga can you add the rendering / windows tags to this? It's kind of related to things I found out in my tests here: |
Godot version
4.2.dev5
System information
Windows 11, AMD 7950x, RTX 4090
Issue description
All 2D SubViewports behave normally in-editor, but in-game act as if they are using the
canvas_items
stretch mode in Project Settings; they do not respect the resolution set insize_2d_override
. There is no apparent way to change this behavior. I am trying to make a game that has a pixel-perfect low-resolution game-view with high-resolution pillarbox art. This appears to be impossible to do with Viewports currently, and is an important inconsistency as this behavior is desired for many pixel art games.Godot_v4.2-dev5_win64_otKZtlhkH2.mp4
Steps to reproduce
Use a SubViewportContainer with
stretch
enabled and a SubViewport with thesize_2d_override
set to a low resolution andsize_2d_override_stretch
enabled. The SubViewport resolution will appear different when the game is run than it does in the editor.Minimal reproduction project
subviewport problem.zip
The text was updated successfully, but these errors were encountered: