3 ms·
I don't get why the higher level frameworks can't make it easier though. I've used three.js before (without knowing any webgl) and was burned by the fact that l
by uyt 5y ago
I don't get why the higher level frameworks can't make it easier though. I've used three.js before (without knowing any webgl) and was burned by the fact that lines can't even display consistently across devices. For example the line widths would be ignored in some cases but not others: https://threejs.org/docs/?q=line#api/en/materials/LineBasicMaterial https://threejs.org/docs/?q=line#api/en/materials/LineBasicM...
- skrebbel 5y agoI think it's because nice lines aren't a super big use case for WebGL. Most people use it for 3d scenes, 3d objects, etc. In other words, I suppose that three.js doesn't have nice lines because nobody contributed it, which is usually a sign of low-ish demand. (I know nothing about three.js governance and goals so I might be mistaken)
- deleted 5y ago[deleted]
- mattdesl 5y agoBecause 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.