Writing a Vulkan renderer from scratch [Part 0]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome to my series on creating a game engine and game with c plus today i'm going to start writing a vulcan renderer from scratch just a warning you will not see some crazy advanced vulcan program at the end of this video it's a devlog that covers like five hours of work so let's lower those expectations a little bit this is not really a tutorial either because i've literally never used vulcan before but i want to provide some value to you guys so i'll show my process for learning a brand new api and how i did it i have provided links to all of the resources i used in the description of this video first of all what even is vulkan anyway it's a 3d graphics api similar to directx and opengl but it's kind of the logical successor to opengl the idea behind vulcan is that it's very low level and essentially abstracts away no details about what your graphics hardware is doing this allows for very cpu efficient rendering code but it will not necessarily make gpu operations any faster its low level nature has also led to this perception that it's very difficult to learn and use so let's see if that's actually true i'm going to share a secret with you guys and you have to promise not to tell the illuminati that i shared this with you okay it's going to sound crazy but get this all right no one writes an api that you can't use it's incredible i know it seems kind of obvious but once you realize that apis are designed to be used by anyone not just those who wrote them you'll realize that the developers of vulcan have gone out of their way to publish samples and other learning materials for others to learn their api in fact if they didn't do this no one would use it i spent some time reading the vulcan specification now i know it looks long and boring but there is a huge amount of useful information here one thing i like to do when learning anything is to memorize as much as i can of the subject matter it might seem pointless but it makes things a lot easier and sort of frees up your mind to actually understand what you're reading instead of getting hung up on jargon or language that you don't understand i used a free program called anki to make some flash cards which i found is the most effective way to memorize things for me anyway i am pretty familiar with how opengl and directx work and it became clear very quickly that vulcan has some major differences accommodating these differences will take a bit of restructuring of my code but nothing too major the main problem is that in a sense opengl and directx are a bit looser in terms of what you can and can't do you also have to keep in mind that my game engine needs to support all three apis in one common interface so i can't really take any shortcuts here i wanted to at least have something to show though so i created some skeleton objects which will basically implement the vulcan rendering code in the future i didn't really have time this week to render anything on the screen but you'll have to trust me that this code actually does set up a vulcan device in context or you could check out the code on my github link in description i also created a more legit demo project with multiple demos that i could easily run and make sure that i haven't broken anything in my restructuring so for example here is the multiple window demo since my engine supports multiple game windows as you can see it works the same with opengl and directx but the vulcan version currently outputs nothing what a shame now i know what you're thinking onge this is not much of a flex bro i've seen other people write an entire game on youtube in 24 hours come on man this is like two screens and they're different colors i i don't get it well you see if i wanted to display something on the screen from scratch in 24 hours it's uh it's actually not that hard see here is a demo in the vulcan samples github repository which pretty much sets up everything you need to render to the screen it's all right there it only renders a triangle but it's pretty easy to swap out that geometry for something else and you're done i already have shaders written so i mean i could have just copied this and pasted it into my own code base but when you're trying to write something that can support multiple apis this haphazard approach isn't going to work very well and i'm trying to write an engine that can be used in multiple projects not just a specific game good software takes time and my goal is getting a good understanding of vulcan and writing a solid implementation that i can use in the future so yeah a pretty boring video this week my apologies i know i promised months ago that if i reached 500 subscribers i would do a vulcan video you got me i've actually been working on a different project where i rendered this image with my own raytracer i'm very proud of this this took up it took a very long time please check out that video if ray tracing interests you i actually show the process of modeling the car and i talk a bit about the node-based programming language i wrote so yeah check it out if you want i'll have some actual game updates soon and i am still working on this project it just isn't the only project that i'm working on hope you guys enjoyed the video anyway and i'll see you next time bye for now
Info
Channel: AngeTheGreat
Views: 57,066
Rating: undefined out of 5
Keywords: 3d, c++, c++ game dev, c++ game development, coding, coding adventure, dev log, devlog, game design, game dev, game dev log, game devlog, game engine, game engine programming, game level design, gaming, indie, indie game, indie game design, indie game dev, indie game development, indie game devlog, making a game, programming, software development, c++ game, vulkan, opengl, open gl, directx
Id: OVxUsT6F93w
Channel Id: undefined
Length: 5min 18sec (318 seconds)
Published: Sun Jun 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.