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

linewidth not respected in Mac OS Chrome 55.0.2883.95 #10357

Closed
3 of 4 tasks
subvertallchris opened this issue Dec 14, 2016 · 15 comments
Closed
3 of 4 tasks

linewidth not respected in Mac OS Chrome 55.0.2883.95 #10357

subvertallchris opened this issue Dec 14, 2016 · 15 comments

Comments

@subvertallchris
Copy link

subvertallchris commented Dec 14, 2016

Description of the problem

LineBasicMaterial no work in Chrome. Works great in Firefox. Worked in in Chrome 54 until we updated to latest release. We get the lines, they have no width. I know this has been reported a million times in regard to Windows but I'm on Mac OS 10.11.6.

Three.js version
  • r82
Browser
  • Chrome
  • Firefox
OS
  • Mac
Hardware Requirements (graphics card, VR Device, ...)

NVIDIA GeForce GT 750M

@subvertallchris
Copy link
Author

Can also add that this is happening on two different Macs, OS 10.11 and 10.12, respecively. We saw it working in Chrome 54, updated to 55, immediately broke. On Ubuntu 16.04, same version of Chrome, Intel HD 520 graphics, it looks fine.

We're using https://threejs.org/examples/webgl_lines_splines.html to test it out.

@mrdoob
Copy link
Owner

mrdoob commented Dec 15, 2016

Oh, so it was Chrome, I thought I broke something... I can reproduce this too. (OSX 10.10.5, Intel HD Graphics 6000)

https://threejs.org/examples/index.html#webgl_lines_colors

Chrome 55.0.2883.87 (Same result in Canary 57.0.2951.0)

screen shot 2016-12-15 at 13 51 05

Firefox 50.1.0

screen shot 2016-12-15 at 13 51 45

Safari 10.0.2 renders correctly too.

/ping @kenrussell

@mrdoob mrdoob mentioned this issue Dec 17, 2016
10 tasks
@mrdoob
Copy link
Owner

mrdoob commented Dec 17, 2016

http://crbug.com/675308

@kenrussell
Copy link

Thanks for this report. Per http://crbug.com/675308 : it looks like Apple's OpenGL Core Profile driver does not support wide lines. Switching Chrome to use the Core Profile was a necessary prerequisite to shipping WebGL 2.0.

I'm not sure why Firefox doesn't have this problem, but the reason Safari doesn't is that they don't yet support WebGL 2.0.

I'd encourage switching Three.js's line implementation to something like @spite 's THREE.MeshLine. Is that feasible? Doing so will solve this problem for a lot of developers, and also solve longstanding issues like wide lines not being supported on Windows. (Implementing wide lines directly in the WebGL implementation, as opposed to the OpenGL driver, is non-trivial, and something we would rather not spend our development time on.)

@mrdoob
Copy link
Owner

mrdoob commented Dec 22, 2016

Yeah, I guess we'll have to do the move.

Further reading:
https://mattdesl.svbtle.com/drawing-lines-is-hard
https://docs.unity3d.com/Manual/class-LineRenderer.html

@WestLangley
Copy link
Collaborator

WestLangley commented Dec 22, 2016

@mrdoob From the Unity link

The Line Renderer ... renders billboard lines (polygons that always face the camera) that have a width in world units

World units. That means when you zoom, the line gets fatter. (I assume.)

At a minimum, I think we would need to support disabling line attenuation as in @spite's MeshLine. (Maybe in that case, width could be expressed in pixels, but that has its own complications.)

@yazancash
Copy link

I'm having this problem with Firefox 53.0 (32 bit) & Chrome 57.0
i wonder how you say Firefox 50.1 does not have this problem?
sounds this is related to Graphic diver?

@WestLangley
Copy link
Collaborator

@yazancash

https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/lineWidth

@kenrussell
Copy link

Unfortunately, when Chrome and Firefox upgraded to using the Core Profile on macOS (in order to provide WebGL 2.0 support), a limitation in the OpenGL specification was hit, where line widths greater than 1 were deprecated.

The best way to solve this is at the application level using a thin strip of triangles. Providing a fully OpenGL ES spec compliant emulation of wide lines -- which would be necessary to incorporate this into the browser -- is quite difficult.

@trusktr
Copy link
Contributor

trusktr commented Mar 4, 2018

I'm new to lines. Is linewidth still a problem these days? I can't seem to modify linewidth in Chrome 64 or Firefox 58 in macOS 10.12.6.

In this pen linewidth: 10 looks like follows in both browsers:

screen shot 2018-03-04 at 1 59 45 pm

@donmccurdy
Copy link
Collaborator

Still a problem, and unlikely to change in WebGL 1, see https://bugs.chromium.org/p/chromium/issues/detail?id=60124. There's a workaround in #11349.

@biojazzard
Copy link

This way?
https://threejs.org/examples/#webgl_lines_fat

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 15, 2018

@biojazzard Yep

@terracode

This comment has been minimized.

@mrdoob mrdoob removed this from the rXXX milestone Aug 17, 2020
@aniongithub
Copy link

This way? https://threejs.org/examples/#webgl_lines_fat

How can I use this with SkeletonHelper? The other PR is just about a new material. Any help would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests