1

The standard approach to rendering is to first define VBO and then use layout in

layout (location = 0) in vec4 point;

void main(){
    gl_Position = point;
}

However, the exact same result could be achieved with SSBO

layout(std430, binding = 0) buffer Points{
    vec4 points[];
};
void main(){
    gl_Position = points[gl_VertexID];
}

I am wondering whether there is any performance difference between those two approaches.

Couldn't we just use SSBO all the time and completely get rid of VBO?

Of course the older hardware might not support SSBO, but if I don't care about such compatibility, then what's really stopping me?

Yakov Galka
  • 70,775
  • 16
  • 139
  • 220
alagris
  • 1,838
  • 16
  • 31
  • 1
    Performance is implementation dependent. – krOoze Aug 26 '21 at 17:42
  • Well, I guess that's true. I'm rather curious whether anybody could share any more details. Like some specific statistics for various platforms or point out any other useful information. – alagris Aug 26 '21 at 17:49
  • 2
    https://wickedengine.net/2017/06/05/should-we-get-rid-of-vertex-buffers/ – user369070 Aug 27 '21 at 12:38
  • "*the exact same result could be achieved with SSBO*" Not exactly. You can use a variety of formats with the VB approach. So the data can be smaller without having to write a shader that decompresses, say, 16-bit floats or normalized integers into regular floats. – Nicol Bolas Jan 31 '23 at 17:54

0 Answers0