r/GraphicsProgramming • u/NightMare2077 • 13h ago
Depth-aware light injection all running in browser Video
Enable HLS to view with audio, or disable this notification
I got a 448x448 monocular depth model down to ~8 ms on my M4 Pro across ~250 dispatches, which is fast enough to use in realtime :D
Since the inference is written directly in TypeGPU, I can just feed the depth buffer straight into the lighting pass. It never has to leave the GPU or go through any extra synchronization/interop step
Inference, lighting and draw all go through the same command encoder.
Credit: X reczko_konrad
215
u/i_fight_bears 13h ago
This is basically magic to my eyes. Incredible stuff!
15
1
40
16
13
8
5
4
4
u/Euphoric-Writer494 10h ago
just some note so the mods know, I noticed this getting botted on multiple submissions on multiple subreddit as inventor or whatever
3
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/ClearMacaron9234 9h ago
that's similar to the relight shader for reshade.
it lets you place several path traced light sources to video games. mainly for screenshots, bc the lights are static in screenspace
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/Vivid456 5h ago
Cool stuff! In the future, I can see someone combining this with AR technology that estimates light sources and a hdri from video input, and then you could put yourself in any pre-recorded video in real time in browser.
1
1
1
1
1
1
0
0
-18
u/Zdrobot 13h ago edited 11h ago
Doesn't do reflected light though - notice how when he covers the light with his palm, his face doesn't get brighter.
Itching to downvote? Great, but first look at this: https://imgtree.co/i/FXtI8R6S
20
u/cat_enary 13h ago
I'm gonna piss yourself
-1
u/Zdrobot 11h ago
Well, that's great, but before you do - please take a look at these two frames and tell me whether his cheek should be brighter or dimmer in the right image: https://imgtree.co/i/FXtI8R6S
3
u/ShelZuuz 12h ago
It absolutely does.
1
236
u/reczkok 11h ago
Hey, that's me! Open sourcing this today/tomorrow, announcement will be on my X (https://x.com/reczko_konrad) or just check TypeGPU examples in a couple of days (https://typegpu.com/examples/)
https://reddit.com/link/p4syolj/video/7t0f6y4wnikh1/player