Add a project setting to control 3D line drawing thickness #91171
+15
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks @myaaaaaaaaa for the original implementation 🙂
This setting affects all lines drawn in 3D, including gizmos in the editor and debug draw options. This can be used to make debug drawing more visible, particularly when using a high-resolution viewport.
This relies on hardware support, so it's not available on all platforms and GPUs (see maximum supported line width). It's also only supported in the Forward+ and Mobile rendering methods.
This could technically be implemented in Compatibility with
glLineWidth()
(on desktop platforms only), but I haven't managed to do this yet.Preview
Line width = 1
Line width = 2
Line width = 1 with half-resolution viewport
Effective line width is identical to line width = 2. This shows how thicker lines are helpful on high-resolution viewports, such as hiDPI displays.
TODO