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?
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
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 forsizeAttenuation
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