提高体素引擎的性能

发布于 2024-12-20 08:56:35 字数 353 浏览 2 评论 0原文

正如我在之前的几篇文章中提到的,我正在创建一个类似《我的世界》引擎的东西。

我已将地形分成多个区域,并且仅渲染相机视锥体中的区域。当每个区域的顶点缓冲区被构建时,它们会检查每个块是否可见,如果不是,则不会将其添加到缓冲区中,如果是的话,它会检查哪些边没有被其他块包围并构建那些面。我还启用了逆时针剔除。

任何人都可以建议任何其他方法来提高性能(注意:我还没有添加索引缓冲区,但仅使用顶点缓冲区进行渲染)?前面提到的原因可能是我帧率低的原因......而且我还想知道向该引擎添加索引是否会提高性能。

我也不认为这与内存分配有任何关系。

编辑: 好吧,我已经暗示了索引缓冲区,性能已经大大提高,但我仍然认为它可以提高更多......

As I have mentioned in a few previous posts I am creating a minecraft like engine thing.

I have seperated the terrain into regions, and only the regions which are in the camera's viewing frustum are rendered. When the vertex buffers of each region are bulit they check each block if they can be seen, if not the are not added to the buffer, in the case that they are, it checks which sides are not surrounded by other blocks and builds thoose faces. Also I have counter-clockwise culling enabled.

Could anyone suggest any other ways to increase performance (Note: that I haven't added index buffers yet but am only rendering using vertexbuffers)? The previous reason mentioned may be the reason for my low frame rate... And I would also like to know if adding indices to this engine would increase performance.

I also don't think this has anything to do with memory allocation.

EDIT:
Ok, I have implymented index buffers, performace has greatly increased but I still think it could be increased even more...

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

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

发布评论

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

评论(1

ぃ双果 2024-12-27 08:56:35

在这种情况下,我们会求助于 Profiler :) 我建议 CLR< /a> 和 SlimTune(感谢 A-Type)。根据您使用的 .NET Framework,您可以下载合适的框架。然后你就能找出你的瓶颈在哪里,以及你应该把注意力集中在哪里,而不是在黑暗中刺伤。

In times like this, we turn to a Profiler :) I would suggest CLR and SlimTune (Thanks A-Type). Depending on which .NET Framework you're using, you would download the appropriate one. Then you can find out where your bottlenecks are and where you should be focusing your attention instead of stabbing in the dark.

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