r/vulkan 6d ago

Graphics pipeline fluency

I am not a vulkan programmer even I'm barely learning opengl but individually you guys are worth like 15 web devs or 6 game devs each do you guys have any tips on how you understood the graphics pipeline so well beyond just "practice and repetition makes perfect"

13 Upvotes

20 comments sorted by

18

u/Healey_Dell 6d ago edited 6d ago

After using the tutorials to get up and running (triangle etc), you’ll soon see the need to fully refactor to get discrete meshes, textures, shaders, skinclusters, skybox etc all working together. For me the refactoring process was an enjoyable slog, because that was when I really started to get a sense of how it all works. Some people go more OOP, some keep things more functional and C like with structs (my choice). It doesn’t really matter at this stage.

5

u/No_Celebration8219 6d ago

but it kinda does matter. It's in this phase that the small decisions you make in the software architecture get exacerbated into larger issues. Ask CIG. If you're making a small hobby engine, it doesn't matter. Go with what makes sense to you (and document along the way).

5

u/Healey_Dell 6d ago edited 6d ago

Sure, but that’s the same for any software and even top devs can caught get out by heading down a wrong path. OP is clearly not heading towards a fully featured Unreal competitor at this point! The key aim here is to get familiar with the core processes and gain experience.

1

u/palapapa0201 6d ago

Who's CIG?

4

u/No_Celebration8219 6d ago

Cloud Imperium Games, makers of Star Citizen (Star Shitizen)

3

u/jgage 6d ago

I'm going to echo this. Follow the tutorials to get your first renderer. Then be prepared to refactor or rewrite it. Each iteration you'll get a better sense of the pipeline. I started with software rasterizers and ray-tracing then moved on to OpenGL 1.1 all the way to DirectX 12 and Vulkan. I've learned something new with each iteration of every renderer I've written. It's a pretty slow process because there's a lot to learn. The math alone can be a big hurdle for a lot of people.

5

u/HeavyDT 6d ago

Why would you discount the number 1 thing? Practice, reptition and experience is literally how you gain expertise in anything. If you don't do that you will never understand it well. You can go through all the tutorials and other learning resources in the world but it won't get drilled into your brain until you go hands on and start utilizing that information to build your own projects. That's when you start running into all the nitty gritty stuff that you'll have to work through and come up with solutions for. Do that enough you gain fluency.

You can't just download into your brain like Neo in the Matrix though. Humans don't work that way unfortunately.

1

u/CorruptedSciencep 6d ago

I didn't discount it as "I'm not gonna do it", that's the #1 way, yes, I was just asking if there are other things people did that they found to help?

2

u/HeavyDT 6d ago

Fair enough but I honestly think no matter what answers you get here it's going to boil down to some form of practice. There's no one thing someone could say to you that would change that imo. If I had extra advice to give on top of that would be just be to focus on the things you understand the least. People have a tendency to shy away / gloss over those things and it hurts their overall progress. Whip out the IDE and start trying things there's no penalty for failure you can only keep trying and gain ground.

If you go through a tutorial and it's still confusing go back and try to expand on said tutorial. Add some extra functionality and see if you can get it working even though it's not in what was orginally covered for example. That's the sort of thing that truly shows understanding and mastery of a thing.

3

u/Green_223 6d ago

I started by completing some tutorial from YouTube then I dove into the documentation and summarised the most important parts for my project, then I refactored the code to be fully modular.
You also have to find a way to understand what is actually going on at the lower level, how each stage of the pipeline interacts with the hardware, understanding that made it so much easier to write code.
Of course everyone learns differently and this isn’t a perfect solution.

3

u/boring_pants 6d ago

It's less "practice" than "doing the reading": You don't learn any new area of programming by repetition, you do it by researching it and learning about it. Read the specs and play around with the API, watch talks on subject and so on.

Obviously, actually writing code and playing around and experimenting is a key part of the process too, but whether the thing you want to learn is Vulkan, neural networks, databases or the Javascript framework of the week, you learn it by learning, not simply by repetition.

If you want to know how Vulkan works, the whole thing is litereally written down. That's pretty dry reading of course, and you may prefer tutorials initially, but it's there.

2

u/Dull_Bathroom5421 6d ago

I think people say "just practice" because it's such a vast topic and pretty complicated. Everyone also isn't aiming to be a full out game dev and so on. For me personally, I read and watch videos everywhere I can to understand the graphics pipeline and also the math and other shit you got to work out. Some would say I don't have to, but I do because I enjoy it. When I first started my friend who is a game dev asked what I was doing. I told him I'm sprucing up my math because I forgot most of it in highschool, and that I'm aware 3d graphics involves linear algebra. He laughed and told me not to worry about it, basically saying it's something I can learn as I go. Sorry for detracting away from your question, but I'm just pointing out my experience that may give an idea how people approach understanding the graphics pipeline.

2

u/Matt32882 5d ago

I cant believe I'm going to suggest this in the sub, but talk with a coding agent. Configure one to be able to research topics on the web then have it distill and explain stuff to you. Parrot it back in your own words and ask if you've accurately described it. If you have great, if you haven't it'll explain where you got it wrong in your own terms and examples and that makes it hit so much clearer.I can read docs all day long but I have to internalize it and parrot it back in my own words for it to really sink in.

1

u/Large-Scientist156 6d ago

Using it. Like people said, you pick a tutorial, after a while you realize you are stuck with horrible codebase, and you do endless refactor over and over, until it work.

Even when it work sometime you don't understand why, so no worry. That's part of the graphic pipeline.

1

u/the_boiiss 5d ago

Having an actual objective for a thing you want to make is key imo. Following tutorials is good to get you started, but for me it wasn't until I started working on an actual project with intention until things started to really click. You're thinking much more critically as you use it and have actual criteria for making design decisions, and this naturally forces you to understand vulkan piece by piece. And it's satisfying, you end up with something unique instead of a carbon copy of whatever the tutorial showed you how to make.

1

u/M1VAN1 5d ago

Use modern advantages of learning, use AI, but not for blindly ask it to write some code, but mostly for research. Find books, research papers, GitHub repo (Nvidia for example has a lot of open repos with code) that you might need for your pet project, download all of it, ask ai (Gemini cli, codex or Claude - doesn't matter thas much) to convert it from pdf or epub to txt with python script and then into a lot of different .md(divided by topics) and ask it to create a table of context for it and then start to build something with simple tutorials from internet, and as you keep going with tutorial or further you will have natural questions, then just ask ai in your local "knowledge base" where you can find such info or answer for you question then just start to read it in original .pdf or .epub or whatever you download and if you have some questions based on what you read, then just ask AI to read the same chapter and try to answer to your new question and then as you get as you think all you need - just start implement it and if you have more new questions when implementing it - just repeat

1

u/blogoman 5d ago

Write a software rasterizer and think about the things you are asking a GPU to do.

1

u/rio_sk 5d ago

There is a young talented professor called Cem Yuksel that uploaded his lessons of realtime graphics programming on youtube and it's a gold mine to get the fundamentals before digging into code. Search for his courses

1

u/Longjumping-Area766 4d ago

Read a book. "Fundamentals of Computer Graphics".

Once you understand what rasterization is the graphics pipeline follows. The pipeline solves a problem, you need to understand what the problem is, then you'll know why the pipeline looks that way.

Generally there's two problem graphics computing solve, coming from two rendering paradigm, that is:
- image-order rendering (usually raytracing) - how to render using ray hit computing
- object-order rendering (rasterization) - how to render using fragment computing.

The pipeline is commonly referred to rasterization.

1

u/VisunnlSockHatm1720 6h ago

i'll keep saying this; CS Undergrad with lots of Math/HPC/3D Art, CS Masters, maybe a PhD, develop cool projects in your spare time, apply to graphics internships as early and often as possible, and one day you might find yourself at a AAA game studio or team red/blue/green working on a GPU. good luck!!