Used in cesium gl.Lines The lines are jagged, but in threejs gl.Lines The line drawn is straight. Does anyone know why?

Used in cesium gl.Lines The lines are jagged, but in threejs gl.Lines The line drawn is straight. Does anyone know why?

Anti-aliasing settings?

Yeah, as mentioned here: https://github.com/CesiumGS/cesium/issues/9045#issuecomment-661912252

This can be seen on any thin geometry, not just lines. There’s a GitHub issue for that: https://github.com/CesiumGS/cesium/issues/8228

Thank you for your reply, but I still want to know why in threejs GL.LINES Can you draw straight? It seems that there is no answer to this question

You’re asking why both engines use the same WebGL function to draw lines, but they look different, right?

Yes, can you tell me why?

It’s because CesiumJS doesn’t currently apply multisample anti-aliasing (MSAA). There is an FXAA post process you can use that may help a bit: https://sandcastle.cesium.com/index.html?src=FXAA.html.

Drawing straighter might not be the best description. An object is drawn the same either way, however the jagged appearance is softened with anti-aliasing by attaching pixels between the ‘jags’ whoms color are interpolations between the object and what’s around it. The smoothness effect comes at the cost of a less crisp / slightly blurry edge, which usually isn’t a big deal, except for reading small text, for example.