如何在没有MSAA的情况下画平滑线

发布于 2025-02-03 01:12:09 字数 598 浏览 3 评论 0 原文

我正在弄清楚如何使用OpenGL ES绘制平滑线。
我将部分任务的一部分作为以下步骤完成:

  1. 使两个三角形形成线路。
  2. 使其边框透明

您可以询问此链接 old solutioin 要看主要思想。

但是我仍然会一个问题解决:如何平滑行的两端
您可以通过单击图像描述来查看当前情况。 在此处输入图像描述

在图像中,您可以清楚地看到行的左端具有锯齿

有人可以给我解决方案吗?我会非常感谢!

i am figuring out how to draw smooth line using OpenGL ES.
i have done with part of this task as the following steps:

  1. make two triangles to form the line.
  2. make its border transparent.

you can refere to this link old solutioin to see the main idea.

But i still get one problem to solve: how to smooth both end of the line?
you can see the current situation by click the image description.
enter image description here
In the image, you can clearly see the left end of line has sawtooth.

can any one give me a solution? i will thanks a lot!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余生再见 2025-02-10 01:12:10

添加更多三角形以形成端盖,使它们以相同的方式使它们透明。

Add more triangles to form an end-cap, make them transparent in the same way you blend the edges.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文