Vulkan在哪里进行计算

发布于 2025-01-25 00:34:43 字数 220 浏览 0 评论 0原文

我仍然是一个完整的新手,所以请把我当作对此主题有0个知识的人。

目前,我正在用VKCMDDRAW调用每个帧,其中vertexcount参数为6 * numofquads,同时绑定了每个Quad数据的UBO,该UBO将用于Vertex着色器内部的计算。

在调用VKCMDDRAW之前进行所有计算,还是在调用VKCMDDRAW之前进行所有计算,或者我应该坚持当前的计算,是否更有效地进行计算(CPU)?

I am still a complete newbie at this so please treat me as someone who has 0 knowledge on this topic.

I'm currently making a vkCmdDraw call every frame with the vertexCount argument as 6 * numOfQuads, whilst binding a UBO that holds data for each quad, that will be used for computations inside the vertex shader.

Is it more efficient to do the computations outside of the shader (CPU), where I do all the computations prior to calling vkCmdDraw, or should I just stick to what I've currently got?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文