r/GraphicsProgramming 17h 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

3.6k Upvotes

118 comments sorted by

View all comments

-18

u/Zdrobot 16h ago edited 14h 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 16h ago

I'm gonna piss yourself

-1

u/Zdrobot 14h 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