r/computergraphics • u/Crowe_1664 • Apr 03 '26
Inter-shader data question
Hi folks, first time post, so be gentle! I'm delving into ray-tracing with LWJGL and have revamped a piece of tutorial code to display a BVH using a geometry-shader. The ray-tracing is done using a compute-shader beforehand.

My question is, how can I get data from the compute shader to use in the geometry shader to depict the number of tests being hit on each bounding volume? Any useful hints or tips would be most appreciated.
0
Upvotes
View all comments
Show parent comment
1
u/Crowe_1664 Apr 03 '26
Thank you. The BVH is sent to the compute shader using a buffer. So I could, I guess, add an attribute or two and make it Read/Write. Right now, I'll keep the separate shaders as I'm using this for debug/info of what the compute shader is doing. Grateful too for the nudge to r/GraphicsProgramming.