godot
godot copied to clipboard
Add a project setting to control 3D line drawing thickness
- Salvage of https://github.com/godotengine/godot/pull/74387. Thanks @myaaaaaaaaa for the original implementation :slightly_smiling_face:
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.
- This closes https://github.com/godotengine/godot-proposals/issues/9299.
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
- [ ] Expose an editor setting to control line width in the editor while keeping the project setting for the running project.