Hacker News new | past | comments | ask | show | jobs | submit login
Why Geometry Shaders Are Slow (Unless You’re Intel) (joshbarczak.com)
99 points by mxfh on March 18, 2015 | hide | past | favorite | 8 comments



I was working on a problem recently that's remarkably similar the author's rendering of hundreds of thousands of cubes (each arbitrarily oriented in space), and looked into geometry shaders some. There were several points where I thought I'd be able to use them to implement some resource saving trick that occurred to me—but was discouraged by further reading each time.

I guess there are uses out there that they're more ideally suited for, but it'd be great if they did what they do... only fast :)

Now I'm excited about this, though (https://www.khronos.org/vulkan)—which I only noticed through the author's blog.


Ugg! Graphics and GPU compute were split by choice because OpenGL programming is an esoteric art, the only thing that can fix these is simplification - something I don't trust Khronos with because of my miserable experience with OpenCL when compared to CUDA.


Let's hope that since they had input from Value, Epic, and other users of the API instead of just producers they are doing a better job then they did with OpenCL.


From what I've heard, Vulkan is largely based on Mantle.

And while Khronos hasn't released anything unless you're a member of the secret club, you can take a look at Mantle here: http://www.amd.com/en-us/innovations/software-technologies/t...


Does anyone know of a real world game or app that uses geometry shaders?

Everything I've read (including this) says they're good in theory but not so much in practice.


Assasin's Creed mentions of Geometry Shaders being used - (March, 2014, GDC) - https://bartwronski.files.wordpress.com/2014/03/ac4_gdc.pdf

possibly many others.

EDIT: Here is much more updated version (4 versions actually with much more detailed images/video and more notes) - from the author's web-page - http://bartwronski.com/2014/05/09/digital-dragons-2014-slide...

oh, and if you are looking for some fun graphics failures :)

http://igetyourfail.blogspot.com/2009/02/behold-power-of-geo...


For post-processing, Capcom's MT Framework used geometry shaders to generate primitives in lieu of scattered read-modify-writes to pixels. I'm not sure if the bang for the buck was there, but the concept was clever enough that it stuck with me.


They are used a lot for generating normal vectors on the fly, since you can take in a whole triangle, you just do a cross product of two of the edges and you're done. From my experience, they are fast enough as long as you don't emit more than 2x primitives that you take in. They are also useful for culling primitives.

They are not suitable for tessellation, which funnily enough is better done by tessellation shaders. Tessellation shaders are actually pretty flexible, and can do most of the things that you might have thought geometry shaders would be suitable for.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: