5 ms·
The one and only Holy Bible of Graphics Programming. If you're starting to learn computer graphics, just study through the entire site and do the examples one b
by cyber_kinetist 2mo ago
The one and only Holy Bible of Graphics Programming. If you're starting to learn computer graphics, just study through the entire site and do the examples one by one. It doesn't matter one bit that it uses a slightly outdated API called OpenGL - you're supposed to learn how to render things first, not about some weird obscure hardware / driver details!
After you've learned it, you can start learning CUDA if you want to do some more low-level compute stuff on the GPU (sorry, but you should just buy an NVIDIA card, CUDA is just that good). Or if you actually want to just make things but want to use a nicer cross-platform graphics API than OpenGL, then I recommend SDL3. (Or use Metal if you want to make macOS exclusive apps - it's actually a quite nice API)
Vulkan or DX12 are currently flawed APIs that are unnecessarily complex and doesn't even match the performance characteristics of current-gen hardware anymore. (see the titular post: https://www.sebastianaaltonen.com/blog/no-graphics-api https://www.sebastianaaltonen.com/blog/no-graphics-api). However if you want a computer graphics career (either in the game industry or in other niche domains) having experience with these APIs will be beneficial since these are what many production apps are currently stuck with - though honestly the job market for graphics really suck nowadays. (The biggest sector was triple-A game companies with their own engines, but the game industry is imploding right now...)
- anaisbetts 2mo agoI've heard that learning WebGPU is a pretty decent alternative, it's cross-platform, has runners that are non-web, and has some of the niceties of Metal without being platform lock-in
- godwinson__4-8 2mo agoIndeed, and a well regarded WebGPU guide is also trending on the front page at the same time :P The "universal" nature of WebGPU with the "web" focus feels a lot like the graphics API equivalent of WASM. In that regard there are also some interesting projects/opportunities.
- fsloth 2mo ago"The "universal" nature of WebGPU with the "web" focus feels a lot like the graphics API equivalent of WASM" Having shipped non-trivial WASM code in two projects That's not a positive thing. WASM is stuck in zone between living and the dead - just good enough (barely) to merit creating production code when you need the perf in browser but not good enough to register as industrial quality tool as it's not possible really to debug a WASM application. If you really, really need the perf in your browser app, WASM may be the only option, but it's not really a good one.
- godwinson__4-8 2mo agoIdk maybe you were working on far more complex things but personally I didn't feel this way. Then again perhaps the devx was just not as bad as I expected given how often I had heard this warning.
- bobajeff 2mo agoActually, at least on Chromium it's possible to use Dwarf debugging symbols in debugging your wasm files. It's a little tricky because the documentation isn't that clear but I've ran programs through that and it works. Also there a vscode extension (which I prefer over using vs the browser devtools). If you have that it's basically like using any other debugger in vscode (including CodeLLDB) only you launch the browser when you're debugging it.
- flohofwoe 2mo ago> as it's not possible really to debug a WASM application ...as others have said, this is a solved problem and has been for quite a while: https://marketplace.visualstudio.com/items?itemName=ms-vscode.wasm-dwarf-debugging https://marketplace.visualstudio.com/items?itemName=ms-vscod... I might even go that far and say that this solution is on average more robust and more responsive than debugging native code in Xcode.
- fsloth 2mo agoHmm I never could get the DWARF debug information to hook up properly, must give this a try next time I need to return to the topic. If you don't mind - what's your specific setup when debugging Sokol, I might start from replicating that workflow?
- fsloth 2mo ago" it's cross-platform" Nothing in real time graphics _actually_ is cross platform. You are always programming a vendor hardware. "Cross platform" really has no value in graphics programming, honestly, when discussing the lowest level programmable api. You always need to explicitly say which platforms you target, and then test on those platforms. The main questions should be "on which platform will my users run it" and "can I debug and test this". So if you are starting out - pick out the easiest api for you. Don't go looking for universality as a value on it's owm (if you want universal rendering, choose CPU rendering. if you want high perf - choose your GPU platform(s) explicitly).
- philistine 2mo agoas a mac user who does suffer from the insanity of compiled for Mac, but never tested on a Mac, thank you.
- jplusequalt 2mo ago>The one and only Holy Bible of Graphics Programming. The textbooks Real Time Rendering and Physically Based Rendering are far more deserving of such claims.
- deleted 2mo ago[deleted]
- cyber_kinetist 2mo agoNote that I've used the term "Graphics Programming" rather than just "Computer Graphics". The RTR book doesn't teach you the programming side of things at all, the material is more theoretical and reads more like a reference book. Most importantly it doesn't have any examples with full source code, so it's not a friendly book to follow for beginners. The PBR book is much better in this regard, but it mainly focuses on offline ray tracing / path tracing which is bit of a distinct topic from conventional real-time rendering on the GPU.
- deleted 2mo ago[deleted]
- josemanuel 2mo ago> but the game industry is imploding right now... Why is that? Is it because of AI automating many steps of game creation?
- tstenner 2mo agoModern gaming hardware is getting increasingly inaccessible and the micro transaction infected mobile gaming market is the only one make money.
- meheleventyone 2mo agoNo, it’s a combo of a post-covid slump in spend, western markets becoming saturated and an assumption from the majority of industry that wouldn’t happen. Essentially games revenue has grown incredibly over the past twenty years and it’s now crunched to a halt. Then layer in some incredibly bad bets like Game Pass for XBox and audience tastes shifting away from splashy big budget releases making them an “inevitable” success. It’s left middle aged execs heads in a twist. In a broader view discoverability is the big problem for everyone. People are hoping in the short term that reducing budgets and scope will save things but all that will do is make the discoverability problem worse. So everyone’s hot under the collar for codev, offshoring, “the Hollywood model*” and so on without looking at the downstream effects of everyone doing that. AI has largely impacted games by sucking all the available money away and the discoverability problem has made what little is left extremely conservative. * - This has been a thing for at least three decades now in games despite the obvious collapse of this model and Hollywood.
- 21asdffdsa12 2mo agoAI has augmented indies, to go to gfx fidelity only held before by AAA. So the traditional pipelines are going Add to that a mass-rejection of the media produced by the western DEI priest caste resident in game studios (the players buy games as they used too from china, korea, japan, the slump literally only affects western studios). Nobody goes to a preachy church for escapism. Bad bets all around.
- superdisk 2mo agoThe best selling game of all time (Minecraft) is basically GL 1.1. You really don't need much.
- cyber_kinetist 2mo agoNope it uses modern OpenGL and LWJGL bindings under the hood. Recently they're in the process of switching the entire thing to Vulkan.
- pjmlp 2mo agoYes, but that was after it became famous, the point being that gameplay matters most.
- daniela-vera 2mo agoWorking through every example in order is the real advice here - the site clicks once you've actually debugged your own framebuffer, not just read the chapter. The math only sticks after you've drawn something wrong a few times.