7 ms·
Because this is largely outside the scope of most 3D game engines. Rendering crisp 2D lines (or any anti-aliased complex vector polygon) on the GPU is hard: it
by mattdesl 5y ago
Because this is largely outside the scope of most 3D game engines. Rendering crisp 2D lines (or any anti-aliased complex vector polygon) on the GPU is hard: it involves a lot of high level decisions about how to process, structure & submit the data to the graphics pipeline. Depending on the application, one approach may be vastly superior to the other.
I do think ThreeJS should include basic thick screen space line support, though, as it covers most use cases and doesn’t add a lot of bloat/complexity to the core framework.
- jmiskovic 5y agoThreeJS in fact has implementation for screen space 'fat lines'. [0] https://threejs.org/examples/webgl_lines_fat.html https://threejs.org/examples/webgl_lines_fat.html
- jonplackett 5y agoDo you know if these display the same across devices? And also if the 10px limit is a hard limit or just of this demo?
- jmiskovic 5y agoI didn't actually used three.js, just studied the implementation a bit. It creates triangle geometry so I would expect it to work across all supported devices. The 10px is just the limit of demo slider.
- mattdesl 5y agoTrue. It's part of their examples, but would be worth having in core I feel, as most people are using THREE.Line for their apps/designs which is unreliable.