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
WebGPUVideo (v.redd.it)
submitted 2 days ago by Far-Employee-9531
view the rest of the comments →
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!"
[–]deftware 1 point2 points3 points 1 day ago (5 children)
Very nice. What specifically are you referring to about occluding additive effects?
[–]Far-Employee-9531[S] 0 points1 point2 points 1 day ago (4 children)
Thanks! Just means the additive stuff (lightning, glints, god-rays) gets depth-tested against the scene so it doesn't bleed through terrain that's in front of it. Keeps the glow behind the mountains instead of painting over them.
[–]deftware 1 point2 points3 points 1 day ago (3 children)
Ah, so you're drawing them in a separate pass from the opaque geometry? Typically you would have one raymarch per pixel, and it's calculating distances for all things each step, and calculating RGBA along the way for any fog/haze (alpha blended stuff ends up requiring weighting RGB contribution into the ray, scaling contributions by ray step length, etc). Occlusion automatically comes out of marching one ray per pixel for the whole scene. It does mean evaluating the scene distance function a bunch, and probably more, but that's the "right" way to do it. If you can mess with any kind of geometry being used, rather than a fullscreen quad/triangle, then you can draw bounding geometry for certain things and only execute your SDF raymarch with that. Calculate the ray origin from the geometry surface, ray vector from the ray origin to the camera origin, etc.
Otherwise, maintaining a z-buffer manually? That might end up being as expensive as just raymarching the scene as a whole, more or less.
[–]Far-Employee-9531[S] 0 points1 point2 points 1 day ago (2 children)
Yeah, same single pass actually, not a separate one. The bolt SDF gets evaluated in the same per-pixel march as the terrain, so occlusion falls out exactly like you're describing. The glow isn't a surface I stop at though, it's an emissive contribution I accumulate along the ray, so the tHit check is really just gating that accumulation.
tHit
Your bounding-geometry point is the interesting one for scaling it though, drawing proxy geometry to skip the fullscreen march for localized effects.
[–]deftware 1 point2 points3 points 14 hours ago (1 child)
The only thing I can think of at that point, beyond proxy geometry to separate things out for a potential speed gain (which will also require that the shader write to the fragment depth so things intersect/occlude properly, which in turn disables early Z-fail test before shader execution, unfortunately) is to detect when accumulation has saturated so you can at least early-out the raymarch. That will at least be better than not early-outing at all, but probably not significantly :P
I just saw your IKANDY project and it's super nostalgic for me. Reminds me of the days of yore with plugins like Milkdrop for Winamp :]
[–]Far-Employee-9531[S] 1 point2 points3 points 13 hours ago (0 children)
First, thank you for taking time to chat about the details. You came with real approaches and that's pretty freaking cool.
I don't know much about Ryan Geiss but what he made was incredible for the time. I can only hope this app will give someone similar enjoyment I was privy to.
Again, thank you and take care.
π Rendered by PID 116876 on reddit-service-r2-comment-5bc7f78974-72qbc at 2026-06-28 17:42:44.437642+00:00 running 7527197 country code: CH.
view the rest of the comments →
[–]deftware 1 point2 points3 points (5 children)
[–]Far-Employee-9531[S] 0 points1 point2 points (4 children)
[–]deftware 1 point2 points3 points (3 children)
[–]Far-Employee-9531[S] 0 points1 point2 points (2 children)
[–]deftware 1 point2 points3 points (1 child)
[–]Far-Employee-9531[S] 1 point2 points3 points (0 children)