SSBO和图片加载/存储之间的差异 [英] difference between SSBO and Image load/store

查看:140
本文介绍了SSBO和图片加载/存储之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

着色器存储缓冲区对象"(SSBO)与图像加载存储操作之间的区别是什么

What are the diffences between "Shader Storage Buffer Objects" (SSBO) and Image load store operations

什么时候应该使用而不是另一个?

When should one be used and not the other?

它们都可以有原子操作,我假设它们存储在相同类型的内存中.而且,无论它们是否存储在相同类型的内存中,它们是否具有相同的性能特征?

They both can have atomic operations and I assume they are stored in the same type of memory. And regardless if they are stored in the same type of memory, do they have the same performance characteristics?

edit:最初的问题是在SSBO与统一缓冲区对象之间询问,它本来是在SSBO与图像加载存储之间.

edit: the original question was asking between SSBOs and Uniform buffer objects, it was meant to be between SSBO and Image load store.

推荐答案

着色器存储缓冲区对象和图像纹理之间的区别以及为什么要使用它们的原因是它们可以使用接口块.

The difference between shader storage buffer objects and image textures and why one would want to use them is that they can use interface blocks.

图像只是纹理,这意味着只有vec4在数据结构中.不仅是vec4,它还可以具有其他格式,但是数据结构可能是一种数据类型中的许多.

Images are just textures which mean only vec4's are in the data structure. Well not only vec4, it could have other formats, but the data structure would be many of one data type.

SSBO是通用的.他们可以在单个接口块中结合使用int,float和vec3的所有数组.

Where as, SSBO's are generic. They can use combinations of int's, float's, arrays of vec3's all in a single interface block.

因此,SSBO的灵活性比Image Texture的灵活得多.

So, SSBO's are much more flexible than just Image Texture's.

这篇关于SSBO和图片加载/存储之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆