4 ms·
I've read and re-implemented a lot of stuff by Inigo Quilez. Much of it is ingenious but eventually straightforward once you get the hang of it. I still find th
by pierrec 4y ago
I've read and re-implemented a lot of stuff by Inigo Quilez. Much of it is ingenious but eventually straightforward once you get the hang of it. I still find this particular snippet magical:
https://www.shadertoy.com/view/MdB3Dw https://www.shadertoy.com/view/MdB3Dw
Well, the code itself is simple GLSL. The math is (and I have not verified this) not that complex either, as I believe it's all about integrating the raytracing equation for a moving sphere over the time variable. I guess what I find most impressive is just the fact that it works and that someone even thought of doing that. I also think this is currently the only example of this method being used anywhere, and it might mostly stay that way because the method might not be super generalisable.
- paulgb 4y agoHis “Painting a Character with Maths” video is also incredibly mind-blowing. https://www.youtube.com/watch?v=8--5LwHRhjk https://www.youtube.com/watch?v=8--5LwHRhjk
- CyborgCabbage 4y agoHe has a YouTube channel as well: https://youtu.be/8--5LwHRhjk https://youtu.be/8--5LwHRhjk Also you may like Marble Marcher made by Code Parade, it's a game that uses a similar approach to rendering: https://youtu.be/9U0XVdvQwAI https://youtu.be/9U0XVdvQwAI
- bob1029 4y ago> I believe it's all about integrating the raytracing equation for a moving sphere over the time variable In all of the samples there is some iteration constant you can adjust. Take this below a certain threshold and things get really interesting. You can almost reason about how it's all working mathematically by plugging in different iteration counts.
- djmips 4y agoIt sounds similar to a technique we used in video games to solve collisions so you didn't miss the interval - using quadratics to solve the swept sphere. In fact so much of what is on shadertoy looks very familiar to video game 'game physics' programmers because a lot of it is related to collision detection. See the Orange book on real-time collision detection (Christer Ericson) for a lot of good code.
- pierrec 4y agoThanks, your description of the technique is simpler and probably more accurate than what I guessed - no integration required. The author gives a similar hint in the comments.
- mjfl 4y agoHe's amazing.