-
Notifications
You must be signed in to change notification settings - Fork 855
10.x.x/vfx/vfx systemborder dpi fix #6148
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
10.x.x/vfx/vfx systemborder dpi fix #6148
Conversation
# Conflicts: # com.unity.visualeffectgraph/Editor/Utils/VFXSystemBorder.cs
Depending on DPI setting the bounds rect could be instable and vary of less than a pixel (especially visible with DPI set at 125%)
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto approving
{ | ||
class VFXSystemBorderFactory : UxmlFactory<VFXSystemBorder> | ||
{} | ||
{ } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected change but probably comes from formatting 🤔
Purpose of this PR
Backport of #5955
https://fogbugz.unity3d.com/f/cases/1372276/
Depending on the DPI of the monitor, and the Windows scaling value (125% is the most common trigger), situations arise where the border/title system around VFX graph blocks constantly dirties itself causing a recursive error from the layout engine. This constant spam degrades the performance of the editor.
This change adds specific checks to resolve scenarios where the internal values have been rounded, but the setting values have not. It also adds protection on the event-based call to do a similar check against the old/new values to avoid additional computation.
Testing status
With a 125% DPI settings on a 4k monitor, I did the following tests: