THREE.MeshLine icon indicating copy to clipboard operation
THREE.MeshLine copied to clipboard

remove extra *projectionmatrix in vertex shader

Open nshelton opened this issue 3 years ago • 1 comments

normal is already computed in clip space so why is it projected again using the projection matrix? This creates incorrect thickness in general but especially for sizeAttenuation to work as expected. Am I missing something magic here?

could be related to these https://github.com/spite/THREE.MeshLine/issues/49 https://github.com/spite/THREE.MeshLine/issues/52 https://github.com/spite/THREE.MeshLine/issues/136 https://github.com/spite/THREE.MeshLine/issues/132

I also noticed strange behavior when scaling meshlines causin the thickness to be unpredictable. So there may be other issues in the shader, I ended up just doing the calculations in world space for consistent (in world space) line width since I wasn't able to guarantee it with this shader

nshelton avatar Mar 25 '22 02:03 nshelton

i've merged your commit in https://github.com/pmndrs/meshline

drcmda avatar Dec 07 '22 12:12 drcmda