Vulkan在哪里进行计算
我仍然是一个完整的新手,所以请把我当作对此主题有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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论