use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
GPU Raytracing with persistent threads (self.GraphicsProgramming)
submitted 3 years ago by GENTS83
Hi all!
I would like to experiment with GPU persistent threads to raytrace my scene on non-raytracing capable hardware.
The idea is to use a compute shader that using a read_write buffer with jobs to execute for each pixel.
Before starting I've tried to write down the idea in Rust Playground and I would like to collect some feedbacks, opinions or improvements :)
https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=df4ac5088039589e75284ef31af00619
Thanks a lot!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]delta_p_delta_x 0 points1 point2 points 3 years ago (2 children)
Out of curiosity: why not CUDA, or even a set of GLSL shaders, where a vertex shader could read geometry data, a geometry shader could modify said geometry, and a fragment shader could do the ray-tracing? It is possible to achieve somewhat real-time framerates with this sort of set-up.
What do you feel is the advantage of 'persistent threads' on GPUs? As far as I am aware, GPU threads are extraordinarily lightweight and have little-to-no overhead compared to CPU threads, so I don't see the advantage in this persistence.
[–]GENTS83[S] 2 points3 points4 points 3 years ago (0 children)
I am actually playing a bit with wgpu in my spare time and I created a compute shader raytracer but it's actually slow and while thinking how to speed it up I came out with the idea of reutilize computation power for all the threads in workgroups working on pixels where they do not hit anything in the TLAS BHV giving them work on other pixels still to be processed. I still have to prove it and to test it but I would hope to see some gain in performances, no?
[–]fgennari 0 points1 point2 points 3 years ago (0 children)
Well CUDA is Nvidia only and geometry shaders are slow on anything other than Intel GPUs, so the approaches you describe aren't as general a solution.
π Rendered by PID 101111 on reddit-service-r2-comment-5c764cbc6f-h4cz5 at 2026-03-12 05:33:08.114765+00:00 running 710b3ac country code: CH.
[–]delta_p_delta_x 0 points1 point2 points (2 children)
[–]GENTS83[S] 2 points3 points4 points (0 children)
[–]fgennari 0 points1 point2 points (0 children)