VBO or Geometry Shader - what's faster?

BlitzMax Forums/OpenGL Module/VBO or Geometry Shader - what's faster?

SystemError51(Posted 2012) [#1]
Hey peeps,

I'm trying to figure out what is generally better to render large amounts of the same geometry?

Say you pipe in a number of vertices as center points for your geometry - and then you either use a routine that builds it for you and stores it in a VBO - or you just upload the points into the graphic card (also VBO) but let a Geometry Shader do all the work.

What are your experiences?


Ferret(Posted 2012) [#2]
I never got any speed gain when using VBO's, tested on different sytems but all with nvidia cards.

On one system i even got graphical glitches, in mi code and in comercial games.
I never had any problems with shaders.

I think it will deppend heavly on the card.

Last edited 2012


SystemError51(Posted 2012) [#3]
Hmm I see... I guess I have to do some optimizing on my own then.


SLotman(Posted 2012) [#4]
I think you're mixing stuff up: VBOs are stored inside the graphics card, so the geometry don't have to be uploaded again and again - only when modified.

Geometry shaders are shaders that can alter Geometry after they've been uploaded into the card. Like pixel shaders, but for 3D meshes.

None have anything to do on how fast geometry is rendered. The render speed is the limit of the card.

VBOs are only faster than traditional OpenGL commands because geomerty is uploaded and it keeps stored in VRAM, while normal commands upload the vertices every frame.

Usually the bottleneck is the upload from RAM->VRAM, or the limits in the card itself. To solve this, you can split your meshes in chunks and only render what is visible (look for culling, binary space partition or even quadtrees for that).


SystemError51(Posted 2012) [#5]
The idea was to store single points as vertices in the graphic card, and then have Geometry Shader do some magic, and create meshes at the particular point. In terms of disk space, this would be quite the saving - but the downside is that each and every time the shader would have to re-create the geometry. The points would be stored in a VBO.

With a VBO itself, it would store the complete geometry, I do one call and it renders it all.

But it seems that neither one of which seems to be noticeably faster than the other.