I like both theory and code, there are already many other tutorials with just code
@jamesrivettcarnac3 жыл бұрын
I know! It's super helpful and so well done.
@Aaron-zv5xd3 жыл бұрын
Yours are the best Vulkan tutorial videos i found so far. The current Balance is great. Imo understanding what to code is way more important than the actual code.
@BrendanGalea3 жыл бұрын
Ok, Great to hear!
@obiwanus3 жыл бұрын
Well, we all know that the real reason this series is great is the chalky style of pictures
@gvcallen3 жыл бұрын
Theory in the videos is awesome! Anyone can learn how to use an API to call functions, but understanding how everything is linked together is the real challenge! Theory and explanations about the inner-workings of Vulkan help immensely to understand when you can use what, and the applications of the different functions and options in one. Thanks so much for this series!
@BrendanGalea3 жыл бұрын
Thank you, I'm very happy to hear that!
@JosephWMicheli2 жыл бұрын
I'm somewhat shocked that more of your videos don't have more views - you've done a phenomenal job. I'm currently implementing an engine using Rust and Vulkan (via the really impressive Vulkano crate), and I've repeatedly referenced your videos in the process. The fact that I have had no issue following along with your C++ implementation shows the high quality of your videos. I especially like the illustrations you provide, because it lets me visualize what your code is doing so that I can write the same thing in Rust more easily.
@hexen933 жыл бұрын
The balance is great so far. I think you touch on important foundational concepts that must be understood to take advantage of Vulkan (and by extension other graphics APIs) effectively. I wouldn't shake your balance up too much so far, I think you're doing great.
@sanduchicu75453 жыл бұрын
Dude you put so much effort in these videos
@BrendanGalea3 жыл бұрын
Thank you, glad you like them. Vulkans still a pretty niche topic but I’m happy with the growth of the channel so far!
@guitarvoicing Жыл бұрын
ha 3rd time I am watching these tutorials...I hope you get back to it at some point. Amazingly well explained. Thank YOU!
@phannguyenthanhtung86003 жыл бұрын
Thanks to your visualization, I can get the idea of the inputs and outputs for vertex and fragment shader stages. Many tutorials I have seen are wall of words and codes. Moreover, the colorspace link is really interesting, this is the first time I've heard about it. Thank you very much, your channel deserves more!
@JMRC3 жыл бұрын
Great series! I like the theory the most. It's knowledge I can remember so that the next time I can rationalize the code any project.
@Sir_Pickle2 жыл бұрын
Balance of theory and code has been really good! as a beginner it is helping a lot. Keep up the great work :)
@cnsujeer3 жыл бұрын
Current style of teaching is helping me to visualize the things rather than just look at bunch of things getting initialized. if possible, continue the same way. :-)
@openroomxyz2 жыл бұрын
I think it's very good balance of Theory and Code, I would even say perfect.
@VoylinsLife2 жыл бұрын
a month ago I had no idea how assigning of these VertexInputAttributes worked. This time I tried to do it by myself before watching this video and got colors working :D Thanks for the great learning experience! Also last time I was confused with how data get's assigned, I started thinking of a struct as some kind of array, not sure if this helps anybody but that's what made me figure out how structs work in cpp :p
@nikola3730 Жыл бұрын
This can easily be a paid course, so much detail, thank you so much man!
@goncalosoares84833 жыл бұрын
Great explanations! I really like the balance between theory and coding
@suncrafterspielt94793 жыл бұрын
Brilliant series. I just had to watch through all of them.
@frenato003 жыл бұрын
Great series! I'm currently in 2nd year university studying computer and informatics engineering and I learned more this week following your tutorials than in a month of computer graphics class. Keep up the good work. Regards from Portugal. Btw I think this is not yet in the playlist.
@BrendanGalea3 жыл бұрын
adding to the playlist now, thanks!
@rutvikpanchal4663 жыл бұрын
I really love your videos, its the best way to learn vulkan and computer graphics in general. Please continue with the same way you are doing right now, i love those in between theory slides coz they help me build the computer graphics pipeline in my mind. Also what are the topics you'll discuss in upcoming videos?
@BrendanGalea3 жыл бұрын
Thank you! And still trying to figure out the exact ordering but we have push constants, secondary command buffers, 3d transformation matrices, diffuse shading and per pixel lighting, staging and index buffers, loading 3d models, user input and a movable camera, game object model, uniforms and descriptor sets, textures, phong/specular shading, terrain generation, fog, sky shader, player movement. So like 15 or so more to go to cover the basics... Sorry for the long waits between tutorials, I've been running a bit behind. Trying to get to the point I can ideally have a weekly releases. In the meantime if you're not familiar with linear algebra I recommend checking out the first 5 or so videos in this series kzbin.info/aero/PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab by 3blue1brown. It's excellent and will help with the understanding of 3D transformations and the mathematics we'll be using for upcoming videos.
@jtaimneas3 жыл бұрын
Like balance of theory and code. good stuff!
@7katona72 жыл бұрын
Probably late on suggestions, but I will leave this comment here anyways. I am most satisfied by your current approach as I am here for Vulkan tutorial. To elaborate: I like that you explain briefly and leave details optional so I can choose to read them and I read them all so far. I like the way that you focus on progress and won't just type out the 500 line of code if it has no current meaning. I like that you provide git-diff for each video. I like that you don't dwell on offtopic themes (such as build-scrit // platform // C++ language and/or keywords).
@BrendanGalea2 жыл бұрын
Thank you! Feedback is always very appreciated. Any suggestions on things you think I could work on/improve?
@zentrocs3 жыл бұрын
Oh my god. Thank you so much for making this
@arthurklause52512 жыл бұрын
Hey ! I like the balance like this ! :) Thank you for your tutorials !
@jentev72173 жыл бұрын
Another great one, keep it up!
@suncrafterspielt94793 жыл бұрын
Just a quick fix Timecode 11:15 should be “intro” Again thanks for the insanely cool series
@BrendanGalea3 жыл бұрын
Hahaha next video will be a short intro and mostly code.
@yegipark48032 жыл бұрын
Thank you so much for the amazingly helpful video!
@BrendanGalea2 жыл бұрын
Glad you liked it!
@codinglikeafox44433 жыл бұрын
Love your videos
@mscmajid3 жыл бұрын
The best Vulkan tutorial. Tnx
@Sf37li03 жыл бұрын
Great tutorials, looking forward to more videos! It would be cool if you set up something like a discord server where we can discuss issues or share stuff that we've created with the engine.
@BrendanGalea3 жыл бұрын
This is a great idea! You'll be the first to know once I've got it set up.
@BrendanGalea3 жыл бұрын
discord invite, discord.gg/3bA7Ysau still a work in progress but I did say you'd be the first to know :P
@hrwang19363 жыл бұрын
you are the savior! please keep up!
@eugenbondarev40863 жыл бұрын
Thanks for your efforts!
@KamiSlayerz6 ай бұрын
Great explanation!
@pedrolino855 Жыл бұрын
I'm not an expert, but at 7:23 I think I can suggest a small optimization, please correct me if I'm wrong - always eager to learn more. So, modern compilers are free to add padding to a struct to optimize memory allocation for the machine (CPU), so the sizeof(Vertex) last bytes might actually be just padding zeros, not actual data. To use the correct size, and potentially use & jump over less memory, you can encapuslate the struct on the header by: #pragma pack(push, 1) struct Vertex{}; #pragma pack(pop) PS: this 'trick' may can come in handy for some hardcore programmer's out there ;)
@VoylinsLife2 жыл бұрын
At 8:58 we set the offset and such, but how does the attribute binding know which variable to use? Do these automatically get assigned in the order we put them in the vertex struct? Or does the offset tell from what point the variable starts which it has to pass to the shader?
@mrshodz7 ай бұрын
Brilliant video.
@dexterman63613 жыл бұрын
@ around 7:50 Is there any way I can use some template magic or some other constructs to generate the offsets and generate the binding info? If I'm not mistaken, this will require some form of reflection support from the compiler, yes? I've gotten to the point where I'm creating the pipeline myself, but am following your code for the videos. Thanks for the really amazing series!
@BrendanGalea3 жыл бұрын
ya it is possible with some template tricks and use of the preprocessor... but it isn't very straightforward. C++ just isn't made with reflection in mind. There are a few other methods that can be used to coordinate shaders and their attribute descriptions, such as dynamically updating attribute info in the .spv code before creating the pipeline. One system I've been using recently is a Builder pattern for Models, and then a helper function in the model class that lets pipelines to specify the order of their attributes, and the function will generate the correct binding descriptions. I might go over this in more detail in a future tutorial. You could also extend the system to provide hints as to which attributes should be interleaved into a single buffer, or kept separate. Which can be useful for example if you wanted to make a deferred renderer, where the first render pass only uses positions and normals for all objects. My advice would be not to worry too much at this point about it. A mistake I made with one of my first engines was trying to make this super flexible system for automatically binding attributes and uniforms. It ended up being way overkill since in reality your attributes tend to be the same 90%+ of the time.
@dexterman63613 жыл бұрын
@@BrendanGalea > ya it is possible with some template tricks and use of the preprocessor... but it isn't very straightforward Haha maybe that's a rabbit-hole for an another day! Got my hands full with vulkan already! > My advice would be not to worry too much at this point about it That's a very good point, thanks for putting me back on the right track!
@japedr3 жыл бұрын
Well, I would vote if possible for a reasoned explanation of the remaining unexplained code and (most importantly) why it is a "reasonable default". In particular: the queue families, buffer types and buffer manipulation; and also the synchronization magic in the swap chain. But I guess you were going to cover most of that sooner or later, so just do what you prefer, at this point I blindly trust your judgement. Also I have a question, if you have used Vulkan compute pipeline (with shaders,etc): do you think it could ever be competitive against Cuda? (after removing all the boilerplate, of course)
@BrendanGalea3 жыл бұрын
Thank you for the suggestion. There are a few topics I’d like to cover first but ya I should probably raise the priority on explaining the code provided sooner rather than later. The code is reasonable-ish. Ie) It wouldn’t be something that is production ready, but is appropriate for beginner/intermediate engines. It very closely matches what would be written following vulkan-tutorial.com with my thoughts being that by reading the links provided in the video descriptions you’d get as complete an understanding of the code as I could provide if i made a video going through it right now. Once the series is a bit further along I’ll have some more context to be able to provide more meaningful explanations. And unfortunately I don’t have enough experience with compute to add anything meaningful to the conversation.
@yaircambordamorocho45063 жыл бұрын
Thanks for the tutorials, very well explained, now I have a question, if I wanted to draw simple lines with a starting point and an end point, how could I do it? Should I create a new pipeline or use triangles by repeating one of its vertices?
@BrendanGalea3 жыл бұрын
It's probably better to create a second pipeline for specifically drawing lines, and set it up with your configInfo.inputAssemblyInfo.topology to VK_PRIMITIVE_TOPOLOGY_LINE_LIST (or strip). I briefly cover this in tutorial 04 in the triangle list vs strip section of the video, but for triangles rather than lines but it's the same idea. One other property it may be worth looking into is configInfo.rasterizationInfo.lineWidth , just note that for lines larger that 1.0f I believe you need to enable the wideLines gpu feature. I've never tried rendering lines in vulkan before, but I think that's all it should take.
@wChris_ Жыл бұрын
actually gpu processing is SIMT (Single instruction, multiple threads) wich is a combination of SIMD with multithreading.
@胡帆-s5h2 жыл бұрын
Hi guys, I just get a question on GPU memory. In this tutorial, we have add a fragColor as output in our vertex shader. But shouldn't we also allocate GPU memory for this fragColor like the way we did for the per-vertex position and color? How does vulkan "know" where to put fragColor after vertex shader and where to read it when doing fragment shader? Thanks in advance!
@DejaimeNeto3 жыл бұрын
Oh nice, looks like I was early this time!
@christophbritsch10743 жыл бұрын
What were the steps if you wanted to replace the triangle by a cube in 3-dimensional space? I tried to wrap my head around the necessary steps but couldn't quite figure out what to do or where to start as I'm still very new to this graphics thing. Also my DebugMessengerDestroy function is crashing the destructor every time I try to close the app and throws a validation error and says it can't find any Object of that Type at a given address. Your vids are awesome btw ;)
@BrendanGalea3 жыл бұрын
I think tutorial 10 will be a 3D cube. It's a bit too much to explain in a youtube comment.But if you want to get ahead I highly recommend the first 5 episodes of this series on linear algebra by 3blue1brown kzbin.info/aero/PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab This is the mathematics that underlies almost everything in 3D graphics. To make something appear 3D we essentially have to perform operations on our geometry to rotate and transform points based on the perspective of a virtual camera. Hmm I'm not sure about the debug messenger. What's the error message, and what operating system are you using?
@nikola3730 Жыл бұрын
Balance between theory and code is best, too much code gets tedious and tires you out really quick but alot of theory gets boring as we wont understand too much of it and get lost as a result. The current balance you keep is ideal
@chakibchemso Жыл бұрын
this tutorial series is phenomenal, thx man for the great work. also i think the color space should be linear to give better and accurate colors, idk tho for now im leaving it in VK_COLOR_SPACE_BT709_LINEAR_EXT it looks great.
@moonyl53415 ай бұрын
great tutorial but how come its B8G8R8A8 not R8G8B8A8?
@jerrys22922 ай бұрын
For most practical applications; Apple products screens, and thus GPU, order color components differently than most everyone else
@xiaodulin37652 жыл бұрын
nice!
@theshortcut101 Жыл бұрын
Hey any chance you'll make more videos?
@dexterman63613 жыл бұрын
How does the shader know which binding to look at? The binding number?
@BrendanGalea3 жыл бұрын
yup for attributes all the shader knows is the location you specify and the data type. From the data type it can infer the size of the variable and how many bytes to read. So if your shader binding locations don't match up with the attribute descriptions it can be difficult to debug because the shader will just read in garbage data. Also each location "slot" is only 32 bytes. So if you have a variable of type dvec4, which is a 4 component vector of doubles (so 64 bytes), that will actually take up 2 locations. In your shader you would have layout (location = 0) dvec4 myDoubleVec; // also takes up location 1 layout (location = 2) float someOtherVar; // next valid attribute location starts at 2
@dexterman63613 жыл бұрын
@@BrendanGalea Thanks for the details!
@iendedyoui7 ай бұрын
Only the top half of the triangle is being displayed (blue/green cut off).
@gasparliboreiro45727 ай бұрын
3:22 that is outright incorrect, that is just if you linearly interpolate, barycentric coordinates aren't that
@dr.raymard95402 жыл бұрын
my triangle with multicolor wasnt generated at the center, rather to the right, did i mess up some coding somehow?
@dr.raymard95402 жыл бұрын
i fixed the problem, in the offset of the position variable of the attributeDescription, i changed the color value to position, and then the triangle was centered, i just wanted to inform that i found the step i missed :)
@ericlanglaismm2 жыл бұрын
@@dr.raymard9540 Thank you! You probably saved me a lot of time:)
@meepk6332 жыл бұрын
Why pass the color from vert to frag? Isn't that an extra copy per vertex?
@VoylinsLife2 жыл бұрын
I guess when we pass in our position and color, they go to our vertex shader only, that's why we need to pass them to our frag from the vertex. You can see this by how we put the location in the vec3 out, it is 0, which is actually the position on the in variable. You have to see the process as the route he explained earlier, you can't just pass data a couple of steps ahead in that path, you need to carry it along.
@flocela3 ай бұрын
In case someone else has this error: Error: vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState->pVertexBindingDescriptions[1].inputRate (29) does not fall within the begin..end range of the VkVertexInputRate enumeration tokens and is not an extension added token. The Vulkan spec states: inputRate must be a valid VkVertexInputRate value Bug in createGraphicsPipeline(): vertexInputInfo.vertexBindingDescriptionCount = static_cast(attributeDescriptions.size()); SHOULD BE: bindingDescriptions.size() not attributeDescriptions.size()
@cactusmamelu3133 жыл бұрын
More !!!
@krabatzki3 жыл бұрын
First this is really awesome. I also read the vulkan-tutorial.com/ and with your videos it comes much better together. But I still feel i lack the basic understanding of engine development, do you have any good reading resource recommendations about this? Thanks a lot and keep up the great work.
@BrendanGalea3 жыл бұрын
Not really, this has been something I've been looking into. I've mostly relied on old course notes and online resources. Game Engine Architecture by Jason Gregory is a textbook that's commonly recommended. It's rather expensive to buy physically though... Here are some good course notes which I think can serve as a pretty good introduction. homepages.fhv.at/thjo/lecturenotes/sysarch/index.html Also this tutorial here on entity component systems I've found myself referring back to over multiple years and I'd say is a great place to start www.raywenderlich.com/2806-introduction-to-component-based-architecture-in-games And glad to hear that you like the tutorials so far. Thank you for the support!
I wish you would use nim for these tutorials. Why ? See github.com/krux02/opengl-sandbox - A nim project for writing shaders inside the code using the language itself