What do with compute shaders?!

Started by
15 comments, last by JvdWulp 9 years, 5 months ago

Shaders can be used to manipulate vertex objects or fragments. You can create all kinds of effects. See http://talkera.org/opengl/ for some examples

This isn't about shaders in general, it's about compute shaders. It's clear that the OP knows what shaders are and what they do.

Exactly, Im just wondering what others are doing with it.

Advertisement

You could cull lights in parallel. Look up Tiled Forward or Tiled Deferred.

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

@bioglaze: I could try that would be cool to be able to have +1000 light sources. But I would settle for +100 too :P

I'm surprised no one has mentioned particle simulation yet, nvidia has a nice demo available as part of Gameworks (there is also a compute based water simulation as well in the samples collection). Compute is also great for parallel sorting, though for a game this is a little less applicable unless you sort and then use the data purely on the GPU.

@bioglaze,JvdWulp: my clustered deferred implentation goes up to 60K lights at smooth 60fps :D

I've been implementing an LBVH for culling lights and used it along with my tiled/clustered deferred renderer.

Tree construction (includes sorting the lights with morton codes), traversal for culling lights for each cluster can all be done pretty fast with computeshaders.

@bioglaze,JvdWulp: my clustered deferred implentation goes up to 60K lights at smooth 60fps biggrin.png

That's impressive! My Tiled Forward implementation only goes up to ~2000 point lights @ 1080p / 60 Hz, however, I use quite a heavy Cook-Torrance everywhere and haven't really profiled it yet.

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

Thanks guys, got some ideas. I think I will try to get a gpu particle system working first maybe later turn the particles into light sources. Maybe I can come up with an more original use.

This topic is closed to new replies.

Advertisement