Having trouble drawing instanced geometry instead of points using computeShaderParticlesExample

Hello!

I’ve been trying to learn from the computeShaderParticlesExample but I’ve become stuck while trying to find a way to draw instanced geometry in place of the raw points currently drawn from the vbo. I think I’ve read every post in the forum related to compute shaders (and searched and searched the web) but, try as I might, nothing I’ve tried has worked out for me so I’m finally asking for help. :cry:

I feel sorry to ask but… I would greatly appreciate if someone could take the time to show me how to go about modifying the example so that instead of the vbo.draw(…) call I would be able to use a vertex shader to draw ofVboMesh primitives, similar to the textureBufferInstancedExample or vboMeshInstancedExample.

Thank you!

As I work on macos I can’t really tell (compute shaders dont work in it)
@arturo @tgfrerer might be able to help.

1 Like

Thanks @roymacdonald , I appreciate you trying to help. I believe my confusion stemmed from this being my first foray into SSBOs and mistakenly thinking they were specific to compute shaders (and not realizing they are accessible by the whole pipeline.) I won’t be able to test until tonight but I will update this post again when I get it working (or if I’m still stuck.)

Update: I self-resolved this problem. The SSBO is available to all stages of the pipeline and just needs to be declared similarly to how it is in the compute shader. What a beautiful thing!

Thank you again to @roymacdonald for making efforts to help me.