组合图像采样器与单独采样图像和采样器
Combined image samplers vs seprate sampled image and sampler
我想从片段着色器访问具有相同采样参数的多个纹理(例如,纹理和法线贴图)。此外,图像经常变化,而采样器保持静止(假设纹理是视频)。我发现了关于如何完成的相互矛盾的信息。 Vulkan Cookbook 指出使用组合图像采样器可能在某些平台上具有性能优势,但 this Reddit answer 指出组合图像采样器没有任何意义。
我的问题是:是否有任何理由不使用单独的采样图像和 一个 采样器(对于两个图像)考虑到它使程序的逻辑更简单?
很有可能您选择的不是应用程序性能的主要限制因素。它的速度更有可能由用户因素决定:您构建 CB 的效率、遍历数据结构等。
因此,请使用最适合您需求的那个,然后继续。
this Reddit answer states that combined image samplers don't make any sense.
考虑到 "answer" 声称该声明来自规范:
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.
"warns you that [combined image samplers] may not be as efficient on some platforms",最好不管他们说什么,继续前进。
我想从片段着色器访问具有相同采样参数的多个纹理(例如,纹理和法线贴图)。此外,图像经常变化,而采样器保持静止(假设纹理是视频)。我发现了关于如何完成的相互矛盾的信息。 Vulkan Cookbook 指出使用组合图像采样器可能在某些平台上具有性能优势,但 this Reddit answer 指出组合图像采样器没有任何意义。
我的问题是:是否有任何理由不使用单独的采样图像和 一个 采样器(对于两个图像)考虑到它使程序的逻辑更简单?
很有可能您选择的不是应用程序性能的主要限制因素。它的速度更有可能由用户因素决定:您构建 CB 的效率、遍历数据结构等。
因此,请使用最适合您需求的那个,然后继续。
this Reddit answer states that combined image samplers don't make any sense.
考虑到 "answer" 声称该声明来自规范:
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.
"warns you that [combined image samplers] may not be as efficient on some platforms",最好不管他们说什么,继续前进。