Fix blurred content of embedded windows
Fix #54030, https://github.com/godotengine/godot/issues/95387
I honestly don't know if I'm doing it the right way, but the issue seems to be forgotten and after a flurry of attempts I'm getting good results.
before:
after:
example:
embedded-window.zip
In the screenshot, the circles of Test2 and Test3 seem to have become an octagon (the newly introduced white outline probably making it a full circle I'd assume)
In the screenshot, the circles of Test2 and Test3 seem to have become an octagon (the newly introduced white outline probably making it a full circle I'd assume)
It seems to be a problem caused by viewport_set_global_canvas_transform. I don’t know where the specific problem is.
In the screenshot, the circles of Test2 and Test3 seem to have become an octagon (the newly introduced white outline probably making it a full circle I'd assume)
When I manually assign the radio_unchecked icon in the theme (radio_unchecked.svg was copied from godot), there is no white border around the icon, so maybe the problem is related to the theme cache?
The problem of viewport_set_global_canvas_transform should not be within the scope of this PR. What needs to be discussed now is whether the solution of this PR is qualified and whether there are any side effects.
Tested locally, works fine. It doesn't remove all blurriness, but decreases it a lot.
Before:
After:
Tested locally, works fine. It doesn't remove all blurriness, but decreases it a lot. Before:
After:
Have you enabled the font msdf?
No
No
Give it a try?
Hello, It seems that this fix solves https://github.com/godotengine/godot/issues/95387, with no side-effect seen so far.
Hello, It seems that this fix solves #95387, with no side-effect seen so far.
That's great if there's no problem.
Tooltip and popup menu are still blurred: test-4.zip
Texture filtering is not inherited I think.
What is blurred is only the texture with constant resolution, which does not belong to the content of this PR, Whether the texture filtering mode is inherited should be discussed separately?
Tooltip and popup menu are still blurred: test-4.zip
Texture filtering is not inherited I think.
It still looks like this problem can be solved by not using the original texture, but a
CanvasTexture, and setting the texture filtering mode in the CanvasTexture.
It makes me miss 3.x being able to set the filter mode directly on the texture without the need for CanvasTexture. This is also an obvious change since 4.0. How to improve it is beyond the scope of this PR.
In general, I think the blurring issues mentioned in #54030 and #95387 are caused by a combination of issues such as the window's scaling mode, resolution, texture filtering mode inheritance, and so on.
This PR resolves some of those but not all. So I'd suggest making the title a bit more detailed and not marking it as closing those two issues.
So how should I change the title and issue markup?
I edited the title and removed the auto-close.
@timothyqiu Do you think it is fine to go ahead with merging this as-is?
Just wondering if there is something wrong with having this pr so it hasn't been merged yet?
Just wondering if there is something wrong with having this pr so it hasn't been merged yet?
There's nothing wrong a priori, but it needs reviews from maintainers familiar with the Viewport and Window code (such as @bruvzg or @Sauermann).
Code seems fine, will fully check it tomorrow.
Thanks!
After: 