Skip to content
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

Add a project setting to control 3D line drawing thickness #91171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 25, 2024

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

Screenshot_20240425_191230

Line width = 2

Screenshot_20240425_191206

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.

Screenshot_20240425_191236

TODO

  • Expose an editor setting to control line width in the editor while keeping the project setting for the running project.

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. It's also only supported in the Forward+ and Mobile rendering methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow changing the line width of 3D gizmos
2 participants