gpt4 book ai didi

vulkan - 组合图像采样器与单独采样图像和采样器

转载 作者:行者123 更新时间:2023-12-04 16:41:15 25 4
gpt4 key购买 nike

我想从片段着色器访问具有相同采样参数的多个纹理(例如,纹理和法线贴图)。此外,图像经常变化,而采样器保持静止(假设纹理是视频)。我发现了关于如何完成的相互矛盾的信息。 Vulkan Cookbook 指出,使用组合图像采样器可能在某些平台上具有性能优势,但 this Reddit answer声明组合图像采样器没有任何意义。

我的问题是:是否有任何理由不使用单独的采样图像和一个采样器(对于两个图像),考虑到它使程序的逻辑更简单?

最佳答案

很有可能您选择的不是应用程序性能的主要限制因素。它的速度更有可能由用户因素决定:您构建 CB 的效率、遍历数据结构等。

因此,请使用最适合您需求的那个,然后继续。


this Reddit answer states that combined image samplers don't make any sense.

考虑到上述“答案”声称规范中的声明:

On some implementations, it may be more efficient to sample from an image using a combination of sampler and sampled image that are stored together in the descriptor set in a combined descriptor.

“警告您 [组合图像采样器] 在某些平台上可能效率不高”,最好忽略他们说的任何内容并继续前进。

关于vulkan - 组合图像采样器与单独采样图像和采样器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60384671/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com