Jump to content
  • Advertisement
Sign in to follow this  
DarkDrifter

OpenGL How to use SSBO to send scene data?

This topic is 612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, 

 

I'm a long time visitor but I'm finally in need to post here. :)

 

So, I just started to learn OpenGL, with the idea to make a path tracer with Compute Shaders, and then maybe use it as a secondary renderer for my engine (alongside the current DirectX 11 one).

 

I've already made a simple cornell box with spheres, based on the SmallPT code, but now, I want to go to the next level: display actual meshes, and use an acceleration structure.

 

From what I've read a bit everywhere on the web, the best (if not the only) way to transfer big amounts of data to the shader in OpenGL is to use SSBO. However, I can't really find proper explanations on

how to use it.

 

So, my question is: how do I effectively use SSBO to send a big array of triangles to my compute shader ?

 

 

 

Here is the source of my project: https://bitbucket.org/NasimB/darktracergpu

 

Compute shader is in file compute.comp and most of the OpenGL code is in raytracer.cpp, other classes are from the base project (a basic CPU path tracer that I made before that).

Feel free to suggest improvements, I'm always learning new things :)

 

 

PS: Now that I've made my first post, I'd like to thank MVP and L.Spiro for all those posts that helped me in the past  ^_^

 

 

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!