4 ms·
You kind of have to do that stuff, though. There's no getting around understanding linear algebra and feeding vertices into the GPU. It's kind of like the bare
by aaron-lebo 9y ago
You kind of have to do that stuff, though. There's no getting around understanding linear algebra and feeding vertices into the GPU. It's kind of like the bare minimum you need to swim. Yeah you gotta learn it and there's some funky techniques, but you gotta tread water somehow, yeah?
It is a lot to learn at once, but no more than web dev where you are learning html and databases and HTTP and god knows what else at once. And like you said once you grok it, it's pretty easy.
Graphics programming terrified me for the longest time because people acted like it was dark magic and hard. Figuring this stuff out slowly but surely it shocks me how little there is to it and I wish someone would have told me sooner.
I've gotten rendering a cube down to an art (gotta start somewhere). You're talking ~100 lines of JS and double that of C++ but no more than that in any decent language. And that's a cube (or multiple) and a basic camera.
A library like regl shows how simple this stuff can get without lots of boilerplate.
https://github.com/regl-project/regl/blob/gh-pages/example/basic.js https://github.com/regl-project/regl/blob/gh-pages/example/b...
Boom a triangle in 40 lines, but the underlying process of vertices, buffers, shaders, etc is apparent. Cool stuff.
Those asking about Vulkan - Vulkan only increases the boilerplate by design.
- thehardsphere 9y ago> Graphics programming terrified me for the longest time because people acted like it was dark magic and hard Now that I am becoming old, I have started to realize that anyone who creates a feeling of dark magic around almost any programming subject probably doesn't understand the subject very well themselves and has some sort of self-confidence issue that makes them portray whatever it is that way to people who know less than they do.
- pfranz 9y agoI think "dark magic" in a lot of these cases is just a lot of domain specific knowledge to get a general understanding of the topic. I think the Internet has really helped. With a "dark magic" topic like graphics, you can get started with a little bit of domain knowledge and the right template code (which wasn't as easily available before the Internet). Without the right template code, you're doing a lot of yak shaving and having to learn a whole lot at once just to get a triangle on the screen.
- trelliscoded 9y agoThe thing about Vulkan is it moves a lot of the boilerplate out of the driver and into your app. That way you can just tell the hardware what to do (and not to do) without the driver trying to read your mind via API calls and optimizing that way.