4 ms·
Sure! Here's a tutorial using a square: https://paroj.github.io/gltut/Illumination/Tutorial%2013.html https://paroj.github.io/gltut/Illumination/Tutorial%2013.h
by wwwtyro 10y ago
Sure! Here's a tutorial using a square: https://paroj.github.io/gltut/Illumination/Tutorial%2013.html https://paroj.github.io/gltut/Illumination/Tutorial%2013.htm...
In my implementation, I render a cube and discard any pixels that aren't along a ray intersecting the sphere, while the rest are colored according to user settings and atom colors. The same approach is taken with the cylindrical bonds, except of course it's a ray-cylinder intersection instead.
- bananicorn 10y agoWow, thank you! Honestly, I don't understand half of it right now, but hey - now I've got something new to learn. Really thank you very much :)