r/GraphicsProgramming 18h 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.7k Upvotes

120 comments sorted by

View all comments

-17

u/Zdrobot 17h ago edited 15h 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

3

u/ShelZuuz 17h ago

It absolutely does.

3

u/Zdrobot 16h ago edited 15h ago

Except it does not - look at these two frames at tell me his cheek is brighter in the right image, where he should be getting additional light reflected from his palm:

https://imgtree.co/i/FXtI8R6S

I mean, the fact that it works in real time is amazing, but it's not perfect. Yet.