Is it really so difficult to draw smooth lines in Unity?

后端 未结 6 994
醉话见心
醉话见心 2021-02-03 10:51

I been trying for a while to draw smooth lines in Unity but with Line Renderer I obtained only jagged lines with the corners not rounded, in particular when the angle of curvatu

6条回答
  •  孤街浪徒
    2021-02-03 10:59

    TLDR: Consider using Shapes by Freya Holmér

    Disclaimer: I haven't tried it myself yet, but the results look amazing.

    In the past I have created custom solutions where I'd create custom meshes (similar to other solutions described here), vertex shader that offset the verts in screen space and fragment shader with alpha blending to achieve nice AA. I never found the time to create a proper, re-usable package of it, but Freya's solution seem to be much more advanced.

    If I were to need something like this again, I'd check out her library first.

提交回复
热议问题