Hey guys, been having inconsistent rendering of lines from desktop to mobile. each of the colored elements below has wireframe lines on the mesh. On desktop it looks great and clean, but on mobile when zoomed out the lines look fuzzy(first photo). When zoomed in (second photo) the lines look good like on desktop. I assume it’s the lines scaling with the viewport similar to size attenuation for points. but for points this can be set to false. is there anyway to do that for lines?
No, I’m afraid this does not happen. Line primitives are always rendered in the size of 1 pixel. If lines are rendered right on the top of a mesh (as wireframes), z-fighting and clipping can appear. This is more likely to happen if you have a large camera frustum (which leads to less depth precision) or if the camera is far away from the object (since the precision is higher at the near plane).
Thanks, anyway to mitigate this? Perhaps with polygonOffset: true and polygonOffestFactor?
This works for meshes very well but I don’t know how good it works with lines. I guess you have to give it a try.
Turns out it was setPixelRatio(), was set too low for retina screens. Appreciate the help.