Тёмный

Graphics Pipeline Overview - Vulkan Game Engine Tutorial 02 

Brendan Galea
Подписаться 25 тыс.
Просмотров 154 тыс.
50% 1

In this Vulkan game engine tutorial we get an overview of what the graphics pipline is and how we can use it to render images. We then create our first vertex and fragments shaders and go over how to compile them on windows, linux and macOS.
** Timecodes **
0:00 - How does a computer draw?
0:56 - Vulkan graphics pipeline summary
2:29 - Fixed function vs Programmable pipeline stages
3:25 - Why do we use graphics pipelines?
4:21 - Creating a vertex shader
8:02 - Creating a fragment shader
9:53 - Compiling shader code to SPIR-V
10:18 - Linux and MacOS shader compilation instructions
11:50 - MacOS glslc compiler permissions fix
12:15 - Windows shader compilation instructions
13:29 - Pipeline header
15:10 - Pipeline::readFile() Implementation
18:00 - Pipeline::createGraphicsPipeline() Implementation
19:00 - Constructing a Pipeline
20:09 - Outro
** View playlist **
- • Vulkan Game Engine Tut...
** Tutorial Series introduction video **
- • Vulkan Game Engine Tut...
** View all changed files **
github.com/blurrypiano/little...
** Some other resources **
My github for this series - github.com/blurrypiano/little...
Official vulkan samples - github.com/KhronosGroup/Vulka...

Опубликовано:

 

9 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 233   
@MenchenFive
@MenchenFive 3 года назад
I just found this, and this is quite a gem; please continue on your series, don't feel disappointed by the lack of viewers/comments/subscribers yet. This is quite a niche topic, but considering how clear your instructions are, eventually you'll get there.
@BrendanGalea
@BrendanGalea 3 года назад
Thank you, much appreciated!
@crimsonalucard
@crimsonalucard 3 года назад
Nah he's just starting out, once he has more content the views will go up. He just needs to stick with it.
@j_respect5948
@j_respect5948 3 года назад
@@BrendanGalea i was actually looking for opengl but i found vulcan, should i choose vulcan over opengl? But most ide supports opengl
@BrendanGalea
@BrendanGalea 3 года назад
@@j_respect5948 - It depends. There are many more tutorials out there for openGL so it can be easier to learn. It is also less verbose, so getting started with it is easier. If you are already very comfortable programming in c++ then I think either vulkan or openGL are good options, with vulkan being slightly harder. If you're still learning c++ I would recommend learning a bit of openGL first as trying to learn a hard language like c++ and a complicated api like vulkan at the same time is too much to do at once.
@valentinzacarias7673
@valentinzacarias7673 3 года назад
I cant belive this content is free, this series are amazing, thanks for this, and for making internet a better place.
@BrendanGalea
@BrendanGalea 3 года назад
Thank you, that means a lot to me!
@Vengiism
@Vengiism 2 года назад
Amazing stuff Hold this sub
@sethmoore5903
@sethmoore5903 6 месяцев назад
For windows machines that have installed the 64 bit version of Vulkan (only checked version 1.3.268.0), the "glslc.exe" executable mentioned @12:27 can be found in within the Bin folder, rather than Bin32.
@ietsization
@ietsization 3 года назад
Thanks for making these! :) Just got done with the triangle tutorial but this definitely helps to understand it better
@railalis
@railalis 3 года назад
Thank you for the tutorial series! This is really good stuff. You're easy to understand, concise, and informative. Keep it up!
@mesofreak
@mesofreak 3 года назад
hey i just found this video, the tutorials are extremely helpful! Thank you for putting effort into the documentation and timestamps!
@goncalosoares8483
@goncalosoares8483 3 года назад
These videos are amazing, good job and keep up the good work.
@AmaanHasanDilawar
@AmaanHasanDilawar Год назад
This what I was looking for years...Thank you ♥♥
@victornigel7367
@victornigel7367 3 года назад
Thank you very much for the Tutorials! You are very good at explaining!
@phannguyenthanhtung8600
@phannguyenthanhtung8600 2 года назад
the greatest graphic pipeline guide i've ever seen!
@duduken20
@duduken20 2 года назад
Just thank you for your service and product quality!
@williamwherewhatwho6177
@williamwherewhatwho6177 2 года назад
I don't know anything about shaders but still enjoy learning about advanced topics such as this. You had a good tempo in the video and explained everything clearly. GJ
@jamesrivettcarnac
@jamesrivettcarnac 3 года назад
This is the clearest series I've seen.
@lucaaaa6382
@lucaaaa6382 Год назад
Thanks a lot for the tutorials!!! I know this video is 2 years old but it really has no age from the perspective of it's usefulness. I am grateful that you and other people like you educate us so much and I myself learned so much from you tube only. As far as I'm concerned if schools had teachers like you I would love to be there.
@cnsujeer
@cnsujeer 2 года назад
Finally, something that beginners (like me) can understand. Thanks mate!
@eranzecharia
@eranzecharia 3 года назад
Amazing tutorial, thank you!
@stanleywinata9922
@stanleywinata9922 2 года назад
I don't usually comment on youtube videos, but you are a godsent! your tutorial is awesome and super helpful! Especially since there isn't much easy to follow/understand vulkan tutorials and guides out there.
@Juan-jc6oc
@Juan-jc6oc 2 года назад
Wow! I had never compiled shaders for SPIR-V, and following the tutorial on that page, it became cumbersome and eternal to read, about the validation layers. But here, much progress was made. Thank you!
@VoylinsLife
@VoylinsLife 2 года назад
Really gives a good view on the subject. There are parts that I didn't know how they worked, because my knowledge of c++ is still quite new. But with a little bit of looking up I figured out how those work. Thank you!
@ElZafro_
@ElZafro_ 3 года назад
Hey, I've just discovered this channel after some weeks trying to learn Vulkan by myself. It's mind-blowing how difficult topics finally click as you explain it. Thanks so much for the series!
@BrendanGalea
@BrendanGalea 3 года назад
Thank you!! Glad you’re enjoying the series so far
@MrDimakoles
@MrDimakoles 3 года назад
Great explanation, thanks for sharing your ecpirience with all of us
@redsteph
@redsteph 3 года назад
This is awesome!! Please please please do not feel discouraged, you're helping a lot of people. Thank you soo so much!
@BrendanGalea
@BrendanGalea 3 года назад
Thank you so much. These videos do take for me a lot of time and effort so it is really great to hear that there are people out there that find them helpful!
@ozgurpeynirci4586
@ozgurpeynirci4586 3 года назад
This is an extremely beautiful series of tutorials.
@BrendanGalea
@BrendanGalea 3 года назад
Thank you!
@damondouglas
@damondouglas 9 месяцев назад
Thank you for making these videos.
@AntoineViallonDevelloper
@AntoineViallonDevelloper 3 года назад
Subscribed. Extremely promissing channel.
@aydnbilgin1627
@aydnbilgin1627 Год назад
Thanks dude...It helps alot especially on beginners like
@BinaryAgent66
@BinaryAgent66 2 года назад
Agreed. Just found this. Very well put together. Keep going! Please :)
@BrendanGalea
@BrendanGalea 2 года назад
Thank you! More to come!
@dedem1th
@dedem1th Год назад
How this content is free!! can't believe it, hope you stay healthy
@zbl2550
@zbl2550 Год назад
excellent video, benefit a lot
@abarry6002
@abarry6002 3 года назад
love the series so far! already went through the vulkan tutorial website and I also really like that but I wanted to go over a video tutorial to get some different perspectives on the layout and following so far I've actually made some changes to my programming style and text editor (not completely related to the tutorial) i decided to change my brackets to be on the same line, I went from const type to type const because I think that is more direct and I switched from the itai theme to the rose-pine theme in nvim :)
@Antimony-ing
@Antimony-ing 7 месяцев назад
Underatted 💯%
@salieridr9730
@salieridr9730 2 месяца назад
I love your tutorials! I am following the official Vulakn Tutorials but I think it is hard for me to understand how it works. Your explanation is very clear!
@kensclark
@kensclark 6 месяцев назад
I'm loving your tutorials! I followed the complete LunarG tutorial, however, it adds everything into one class which makes it over 1.5k lines of code to search through which makes things hard. Even though I am at an intermediate level of C++, I found it hard to put things into classes. You make it extremely easy! Thank you!
@jahjae
@jahjae 2 года назад
Thank for sharing the idea
@dclxviclan
@dclxviclan Год назад
Academic style, i love this
@StarContract
@StarContract 2 года назад
The best Vulkan series, absolute mad lad
@BrendanGalea
@BrendanGalea 2 года назад
Thank you :) it’s definitely not perfect so I’d recommend not using this as your sole resource. But I think it acts as a pretty good way to get started, especially if you prefer the video format for learning
@damiengates7581
@damiengates7581 Год назад
@@BrendanGalea the way you lay out the pipeline is so concise that this is probably the best place to start
@NavjotSingh-dy4iu
@NavjotSingh-dy4iu 6 месяцев назад
Thank you!!
@gabrieldowling6655
@gabrieldowling6655 4 месяца назад
For those struggling to find the glslc compiler in the Vulkan SDK's Bin32 directory on windows: For the modern 64 bit release of the Vulkan SDK (as of Feb. 2024), glslc is contained in the "Bin" directory rather than the "Bin32" directory.
@m3taldragon1
@m3taldragon1 5 месяцев назад
The fact that you did all this without CMake is amazing... I would've automated things like shader compilation from the start
@brohogany9920
@brohogany9920 3 года назад
Half way to drawing our first triangle you say. This is going faster than I thought!
@cprn.
@cprn. 11 месяцев назад
Please, if you ever find time, make an extra video about differences between your Makefile and the one we get after following vulkantutorial website, e.g. `pkg-config` for `glfw3` returns more libraries than the website suggests and I see you prefer it for some reason. I'd love to get more fluent in C++ (and Makefiles) and this seems like a very fun project but my compilation skills s*ck as*. Everything works so far but idk why which is the worst kind of unknown. I love the way you explain sh*t. 🖤
@may8049
@may8049 2 года назад
and at that moment, he knew, he just f.... ........ound a legendary channel.
@no-lifenoah7861
@no-lifenoah7861 10 месяцев назад
pretty good
@igd1591
@igd1591 3 года назад
I've got an error: simple_shader.vert:3: *error: '' : syntax error, unexpected LEFT_BRACE, expecting LEFT_PAREN 1 error generated.* So I had to change the array declaration syntax to this: vec2 poistions[3] = vec2[] ( vec2(0.0, -0.5), vec2(0.5, 0.5), vec2(0.0, -0.5) ); after that the error disappeared, still syntax looks quite weird.
@BrendanGalea
@BrendanGalea 3 года назад
Yep shaders are programmed in glsl. It is a language that is similar to c but there are some differences.
@igd1591
@igd1591 3 года назад
@@BrendanGalea Sorry, my fault. I was watching late and it seemed you wrote curly braces.
@affepaffe420
@affepaffe420 Год назад
Hello! Thank you for you amazing tutorials. I have an error, when i run my code i get an exception from "vector" that says "Microsoft C++ exception: std::length_error at memory location 0x000000CD9B90EA80." my code looks exactly like yours but it still dosent work. Do you have any idea of what i could be doing wrong? (my guess is thata there is something wrong with my pipeline readfile function)
@Adam-vt8ej
@Adam-vt8ej 2 года назад
Best tutorial on RU-vid!!! What is this IDE used during this tutorial?
@BrendanGalea
@BrendanGalea 2 года назад
VS code. I really like it!
@dalegriffiths3628
@dalegriffiths3628 3 года назад
Great videos, love your clear presentation style - Brendan do you mind me asking your background?, you are so knowledgeable!
@BrendanGalea
@BrendanGalea 3 года назад
Not at all! I've always had a strong interest in computer graphics since I first started coding at around 15. I did a BSc and MSc in computer science.For my masters I was in a computer graphics and animation lab and was a teachers assistant for some grad level graphics and animation courses. Then I've also followed a lot of youtube tutorials for opengl. Following school I spent a couple years at facebook and then worked at a iot device startup for a couple years after that, and just trying to figure out what to do next now. I was working on building affordable motion capture cameras when I needed to make a gui for it and rather than use opengl I figured I could learn vulkan. However I was kind of surprised nobody had created a beginner friendly vulkan series yet. Without my background in computer graphics I knew there wasn't any chance I would've been able to learn vulkan using the existing stuff out there. So I started working on this series in hopes to help with that.
@dawid4450
@dawid4450 2 года назад
Maybe it will have someone but make sure that your files for shaders are encoded in UTF-8 without BOM, glslc wont be able to parse them correctly with BOM, rider added BOM automatically and it was quite hard to realize what the problem was when compiling the shaders
@lilakouparouko1832
@lilakouparouko1832 3 года назад
I had some problem for compiling to the .spv format because my glslc.exe path had spaces in it. Puting quotations marks (these things : ") around the path solved the issue. I thought I'd put that there if anyone has the same problem. By the way thanks a lot for these tutorials, your explanations are great !
@BrendanGalea
@BrendanGalea 3 года назад
Thank you!
@albinadolfsson296
@albinadolfsson296 2 года назад
Helped me, thanks :)
@appletime101
@appletime101 Год назад
when creating the function readFile at ~14:40 why do you choose to return a vector of chars instead of a string, and then use the string constructor that takes a start and end forward iterator once the file is successfully opened?
@dalethepalemale6855
@dalethepalemale6855 2 года назад
On arch linux, the glslc file is included in the "shaderc" package
@VoylinsLife
@VoylinsLife 2 года назад
Thank you!!
@dsl6653
@dsl6653 Год назад
Hello, I just wanna share that if anyone is having the opening file error, and already tried the absolute path, that to me changing the fstream file variable to an ifstream variable solved the error to me.. I think that because it is a compilation file the program cant open with option to write Anyways, thank you for the tutorial, it's super well made!
@RemyDrijkoningen
@RemyDrijkoningen 3 года назад
Hi there, just discovering those tutorials and although all those things are hidden and "automatically handled" by higher level engine, i'm delighted to learn what's happening under the hood and all the work that is put for me everytime i totally fail to optimize anything :D I'm also curious about what software(s) you use to make your "handwritten" blackboard slides? That format is very comfortable to follow
@BrendanGalea
@BrendanGalea 3 года назад
I draw them using procreate on an iPad, and then transitions are edited in DaVinci resolve
@Parker8752
@Parker8752 3 месяца назад
On linux, I kept getting errors opening the shader files - adding std::ios::in to the flags fixed this.
@XiaoZong322
@XiaoZong322 Год назад
Keep getting the runtime error that is failing to open the .spv files in the shaders/ file. I'm program on Xcode on Mac. I ended up copying the absolute address of the files into "filepath" and it works that way.
@shiftingsandsgames
@shiftingsandsgames Год назад
wow what a great job! thank you so much! with the help of ChatGPT my understanding of these fundamentals increased tenfold.
@LolLol-ee1eq
@LolLol-ee1eq 2 года назад
Hello, While writting this in c++ I got another nice little error where the compiler tells me "abort()" has been called. There seems to be an issue with the readFile function. I've tried to catch exceptions with a try and catch block but it doesn't catch any exceptions. I've also seen the comment by nyzs about this topic i trippel checked it and in my code it says "std::ifstream" and not "std::fstream". Thank you for the help :)
@immanuelc885
@immanuelc885 3 года назад
Thanks for making good tutorials! btw is there any difference between .hpp files and .h files?
@BrendanGalea
@BrendanGalea 3 года назад
Thanks! And no not really. If you prefer using .h you can use that and it won’t affect the tutorial.
@10bokaj
@10bokaj 7 месяцев назад
Is 450 required, could I use 3.3 if I also want to use the shader in an opengl context?
@federicotorres6227
@federicotorres6227 5 месяцев назад
if you executing from Xcode, you probably need to change the working directory in Xcode settings (Edit scheme -> run -> options) or set absolute paths to the shader files
@keinplan9058
@keinplan9058 Год назад
when ever i compile the programm i get the error "Unhandled exception at 0x00007FF9F588CB69 in VulkanTest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000C0F1B4F488" at the end of line 18 in lve_pipeline.cpp the memory locations are always diffrent ,do you know anyway i culd fix the issue?
@BSPNode
@BSPNode 2 года назад
Around 19:56, your shader files are around 1164, and 424 bytes/. My Vertex Shader prints 1164 as well, but my Fragment Shader prints 456 bytes instead of 424. Is it ok for my Fragment Shader to be a little bit over, or is there some sort of read issue in my function? I am writing this in C rather than C++, so I am assuming that there is a bit of padding here or there.
@BrendanGalea
@BrendanGalea 2 года назад
Ya at this point I wouldn’t be too concerned yet. Your file might just have some extra whitespace characters or something like that.
@jacksamurai9946
@jacksamurai9946 2 года назад
I'm having trouble compiling the vertex shader. If I use an exact copy of what you wrote, which is the same as on the vulkan-tutorial page, I get an error. "shaders\simple_shader.vert:3: error: '' : syntax error, unexpected IDENTIFIER" I've been googling for 2 days and haven't found anything that helps. Any ideas?
@abdullahmertozdemir9437
@abdullahmertozdemir9437 2 года назад
Make sure you use the correct type of brackets
@leocomerford
@leocomerford Год назад
The full series of tutorial videos: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Y9U9IE0gVHA.html
@reznoflovaniak2873
@reznoflovaniak2873 Год назад
When I try to compile the vert and frag files. I get an error saying glslc: error: cannot open input file: 'Resource Files\simple_shader.vert': No such file or directory glslc: error: cannot open input file: 'Resource Files\simple_shader.frag': No such file or directory I'm on windows and am using visual studio where all my shader files are under "Resource Files" in visual studio. Is there any way to fix this?
@BrendanGalea
@BrendanGalea Год назад
Easiest solution would be to use the absolute path. So like C:/users/…/simpleshader.vert
@AbdulAziz-uo8bk
@AbdulAziz-uo8bk 3 года назад
Can anyone tell me which software are using for this presentation . I really need this types presentation software for planning..
@BrendanGalea
@BrendanGalea 3 года назад
I draw the pictures using the procreate app on an iPad, and then edit the images and apply transitions using the video editor DaVinci resolve. So it’s all pretty manual, any image editing and video editing software should work.
@matanmigdal7108
@matanmigdal7108 2 года назад
hi can you show how to automate the shader compile whit shaderc lib?
@BrendanGalea
@BrendanGalea 2 года назад
Don’t have that currently planned for the tutorial series, sorry!
@szabotudor
@szabotudor 2 года назад
I tried using GLSL Lint extension for vscode, using the glsllangValidator that came with vulkan sdk, but it keeps giving error: "gl_VertexIndex' : undeclared identifier"
@szabotudor
@szabotudor 2 года назад
Just in case anyone else is having this problem, the solution is to set "glslangValidatorArgs" setting to "-V". This will enable the validator to validate for Vulkan (the default being openGL)
@BrendanGalea
@BrendanGalea 2 года назад
Glad you figured it out so quickly!
@sekaus9158
@sekaus9158 2 года назад
can I give you guys a tip to understand something like vertex? try to use Blender this can help you understand batter
@yaircambordamorocho4506
@yaircambordamorocho4506 3 года назад
Greetings again! I have been progressing on my own and I have already come to implement the buffers (I am trying to guide myself from the structure you have in your github), and I am starting with the depth buffer, but it seems that you have already included it in the files of the exchange chain?
@BrendanGalea
@BrendanGalea 3 года назад
Yes the swap chain file class provided set's up the target framebuffers with both a color and depth buffer attachment.
@yaircambordamorocho4506
@yaircambordamorocho4506 3 года назад
@@BrendanGalea tnhx! those files are so helpful!! One more thing about the Swapchain recreation, could you give me a little guide to do it? I tried to follow vulkan's tutorial but I get an error that command buffers are in use
@BrendanGalea
@BrendanGalea 3 года назад
Ya I can do that tomorrow. It’s not too tricky, just everything that depends on the swap chain has to also be recreated.
@BrendanGalea
@BrendanGalea 3 года назад
@@yaircambordamorocho4506 Here ya go: github.com/blurrypiano/littleVulkanEngine/commit/aaa1922eab3d26a1df307ea6747461187286991d I've tested only on linux so far but I think it should be good. I'm probably going to make the next tutorial video on this topic, and then cover push constants after that.
@PabloTheDolphin
@PabloTheDolphin 3 года назад
Hi loving this series so far but I'm stuck at compiling my shaders on Windows. Specifically, my fragment shader throws this error when I run the .bat file: #version: desktop shaders for vulkan spir-v require version 140 or higher Looking at the glslang source code this looks to be a compatibility issue with SPIR-V but everything else so far up to this point has been running fine. Any ideas what could be going wrong? I really want to progress with this series!
@BrendanGalea
@BrendanGalea 3 года назад
The first line of both the vertex and fragment shader files should be #version 450 . I think if you are missing that you might get that error.
@PabloTheDolphin
@PabloTheDolphin 3 года назад
@@BrendanGalea sorry I forgot to mention I have that at the top of my files as well. Line for line both my vertex and fragment shaders are the same as yours but only the fragment shaders gets this error
@BrendanGalea
@BrendanGalea 3 года назад
In that case I really am not sure. Maybe try using a different glslc? You could try this version github.com/google/shaderc Other than that unfortunately I don't really have a clue...
@hice962
@hice962 2 года назад
Old post, but I had the same issue. I found out this was caused by the .vert and .frag files not being saved in UTF-8. Maybe this will help other people.
@jono_owa
@jono_owa 2 года назад
@@hice962 How did you fix it?
@tomkimsour
@tomkimsour 3 года назад
Hi, I m coding on Mac Big Sur with xCode and I'm getting this error when i run the program : std::runtime_error: failed to open file: Shaders/simple_shader.vert.spv I have no clue why, I checked with the file on github and to me they look the same
@BrendanGalea
@BrendanGalea 3 года назад
Likely a path error you could try using an absolute path instead. And did you compile the .vert file to the .spv ?
@tomkimsour
@tomkimsour 3 года назад
@@BrendanGalea absolute worked thanks also another way around was to change my ide environment build path.
@geegee306
@geegee306 Год назад
How to make presentatation picture?
@user-tp1qn2wt6t
@user-tp1qn2wt6t 2 года назад
could you tell me or give me a link to a resource where the creation of several objects in one scene would be described? thank you in advance)
@BrendanGalea
@BrendanGalea 2 года назад
In tutorial 11 I show an example of that being done (but in a suboptimal way). And it actually won’t be until tutorial 20 that we’ve covered enough material to know how to do that in a proper way
@user-tp1qn2wt6t
@user-tp1qn2wt6t 2 года назад
@@BrendanGalea благодарю) translation thank you)
@jonj4040
@jonj4040 2 года назад
I am following along but am stuck at the .bat file, In visual studios, double clicking just slects the file. The filie is not represented by the windows logo, instead a bok with gears if thats of any importance.
@jonj4040
@jonj4040 2 года назад
so it turns out vs2022 uses something called filters as opposed to folders and as susch the lacation of the files was not correct. furthermore even the source filter is not represented in a file heiarchy when I try to navigate my project in the file explorer. Seeems like an interesting design decision on VS2022 part. But, also wanted to say the tutorial series is great!
@arthurklause5251
@arthurklause5251 Год назад
@@jonj4040 Hey I am on VS2022 to. So you just did as if the filters where folders when following the organization of the tutorial and when entering the fille paths you did as if all filles where in the same folders as they are on disk but not in the filter organization of the project ? :)
@Fidelity_Investments
@Fidelity_Investments 3 года назад
god this man moves fast
@BrendanGalea
@BrendanGalea 3 года назад
sorry! is it too fast? I tend to cut out any pauses to keep the video flowing with the intention that people would pause as they follow along while coding.
@Fidelity_Investments
@Fidelity_Investments 3 года назад
@@BrendanGalea I'm sure it's fine for more experienced users but I'm relatively new to c++. Coming from years of backend web dev. A lot of this is just way too fast for me and goes a mile over my head. I'm trying to find someone to help me understand this tutorial more.
@BrendanGalea
@BrendanGalea 3 года назад
@@Fidelity_Investments Ok! Ya I have mostly just focused on explaining the vulkan specifics, and only explain certain aspects of c++ occasionally . There are plenty of great resources for learning c++, I really like www.learncpp.com It's long, but many parts can be skimmed on a first read through and then looked up when you come across that functionality.
@novacaine_.5108
@novacaine_.5108 3 года назад
Hi there, just caught a small issue with this for me but it seems to work for you, for some reason the lve::lvepipeline(consy std::string& vertFilepath, const std::string& fragFilepath) does not seem to like the & symbol after the std::string, this also applies to the void lve::createGraphicsPipeline function. Removing the & symbol from the cpp and the header file fixed my issue but is there any reason why the constructor and refuses the & on the string?
@BrendanGalea
@BrendanGalea 3 года назад
I'm not sure why that would be. What was the compiler error message?
@novacaine_.5108
@novacaine_.5108 3 года назад
@@BrendanGalea"void lve::lvepipeline::createGraphicsPipeline cannot convert argument 1 from 'const std::string' to std::string &'" "Conversion loses qualifiers" void lve::lvepipeline::createGraphicsPipeline(....) overload member function not found in lve::lvepipeline
@novacaine_.5108
@novacaine_.5108 3 года назад
Not entirely sure why it's doing this in comparison to your code but removing the '&' from the hpp and cpp file resolves the issue
@novacaine_.5108
@novacaine_.5108 3 года назад
Correction* this only applies to createGraphicsPipeline function and not the constructor
@clepirelli
@clepirelli 3 года назад
@@novacaine_.5108 check that Ive::createGraphicsPipeline takes a const std::string& as well
@giorgilataria8164
@giorgilataria8164 Год назад
How do I create .vert file in Visual Studio?
@BrendanGalea
@BrendanGalea Год назад
The file extension here doesn’t actually matter. But you should be able to just create a new file and when you save it manually type the extension
@MrDimakoles
@MrDimakoles 3 года назад
Do you have idea how to use GLSL with Metal ?
@BrendanGalea
@BrendanGalea 3 года назад
No sorry, I’ve no direct experience with Metal
@gamerun5480
@gamerun5480 3 года назад
Hey! So i get the "LNK4098 defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library" error at runtime. How can i solve it?
@gamerun5480
@gamerun5480 3 года назад
I am using vs2019 on windows
@BrendanGalea
@BrendanGalea 3 года назад
I'm not really sure, I'll need a bit more information. Do you know at which point you first started getting these errors. At the end of tutorial 1 were things working correctly?
@gamerun5480
@gamerun5480 3 года назад
I got the errors only when i compiled at the end of the second tutorial
@gamerun5480
@gamerun5480 3 года назад
The point is i get these errors even if i use your code instead of mine, ofc by changing the graphics compiler to the windows version..
@BrendanGalea
@BrendanGalea 3 года назад
I can try reproducing this on monday in visual studio 2019. Have you tried to see if the errors are present in both release mode and debug mode? Might also have something to do with the 32 bit vs 64 bit binary for glfw. It could be something related to this: discourse.glfw.org/t/setting-up-glfw-on-visual-studio/1344/2 I'm not super familiar with visual studio though so I'll have to try some stuff out when I have the chance. But my guess is that your code isn't the problem, and its more to do with the project configuration and setup.
@xr.spedtech
@xr.spedtech 3 года назад
Any video editor like that for windows ?
@BrendanGalea
@BrendanGalea 3 года назад
Yes I use DaVinci resolve to edit the videos
@MosKarck
@MosKarck Год назад
my .vert file is not linking to the project al lthe code is jsut plain text if i write anything. VS2022
@kepcukhusamettin9400
@kepcukhusamettin9400 Год назад
hey did you find a solution
@mr.raider744
@mr.raider744 4 месяца назад
@@kepcukhusamettin9400 well im a little late, but try installing GLSL language integration and see if it fixes it
@shylex7660
@shylex7660 2 года назад
Hiya there, like the commenter before me, I know this is an old video, but I was hoping you could maybe give me a hand, I'm using VS2019 and despite now copy pasting in directly from github, am still getting the error. The if statement for file.is_open() catching was having a runtime error at memory location x, upon commenting the if statement to see if it would help me figure out what's up, i got a "vector too long" error. very clueless on how this might happen, but any ideas would be appreciated. I build fine, but running does not work. I love your videos, but my own mistakes are messing me up a bit here D: any chance you could help me out?
@shylex7660
@shylex7660 2 года назад
I have managed to at least continue with the tutorial, using absolute filepaths seems to work, not sure why the simple shaders/simple_shader one wouldnt work. odd
@BrendanGalea
@BrendanGalea 2 года назад
likely has to do with the working directory of visual studio not being where you expect it to be by default. Try googling how to change the working directory of visual studio to where you want it to be if you want to use relative filepaths. I also show a more general build process in tutorial 23 (in hindsight this is something i wish i did earlier on in the series)
@shylex7660
@shylex7660 2 года назад
@@BrendanGalea I'll have a look at this, hopefully this will fix it. Thanks for the help anyway, especially on such an old video. Your explanations are excellent and these are by far some of the better tutorials on this website, so thanks for everything you do.
@kacperxt371
@kacperxt371 2 года назад
I'm using visual studio 2019 and I have a little problem with file extension.
@BrendanGalea
@BrendanGalea 2 года назад
Is this with the .spv files for the fragment and vertex shaders? Make sure that they aren't being included as part of your engine compilation. These shader files are separate files that are read into the engine only at runtime. Visual Studio might be trying to compile them as part of the c++ code for the engine, which would cause problems.
@kacperxt371
@kacperxt371 2 года назад
I mean I was trying to make a file .vert, and I was writing in it, vs didn't recognize what's writing in it
@kacperxt371
@kacperxt371 2 года назад
@@BrendanGalea never mind! I just didn't install GLSL language integration.
@arthurklause5251
@arthurklause5251 Год назад
@@kacperxt371 I had the same issue thx !!
@evelyn.exe_
@evelyn.exe_ Год назад
I followed the tutorial but when running the program I get the error “failed to open file: shaders/simple_shader.vert.spv”.
@BrendanGalea
@BrendanGalea Год назад
Could be a path issue. Try using the full path (c:/documents/…/shaders/simple_shader_vert.spv) instead of the relative path for when reading the file
@evelyn.exe_
@evelyn.exe_ Год назад
@@BrendanGalea that worked thanks!
@mexicano1891
@mexicano1891 8 месяцев назад
You say full path is place the full path and after -o full path again but executable. I don't undestend?
@sebastianrichter8054
@sebastianrichter8054 2 года назад
is there a deeper reason why the coordinate system is so different and why vulkan uses not a cartesian system?
@BrendanGalea
@BrendanGalea 2 года назад
Not sure what you mean, vulkan's coordinate system is different but it still is cartesian based. Here's an article that goes into a bit more detail on how it differs from OpenGL's - matthewwellings.com/blog/the-new-vulkan-coordinate-system/
@sebastianrichter8054
@sebastianrichter8054 2 года назад
@@BrendanGalea maybe i should have called it "standard cartesian system" because the quadrants are rotated clockwise by 90 degrees.. i will read it. thanks!
@dalegriffiths3628
@dalegriffiths3628 3 года назад
Fallen at the final hurdle, getting following in xcode terminating with uncaught exception of type std::runtime_error: failed to open file simple_shader.vert.spv terminating with uncaught exception of type std::runtime_error: failed to open file simple_shader.vert.spv
@BrendanGalea
@BrendanGalea 3 года назад
Are your shaders compiled and make sure the file path is correct. Might try using an absolute path rather than the relative file path
@dalegriffiths3628
@dalegriffiths3628 3 года назад
Annoying because the frag.spv and vert.spv files both exist and have data in them.
@dalegriffiths3628
@dalegriffiths3628 3 года назад
@@BrendanGalea Of course of course Mr B..should know by now that my machine likes the absolute... Vertex Shader code size 1164 Fragment Shader code size 424
@zaiscott
@zaiscott 2 года назад
@@BrendanGalea This helped me sooooooooo much
@zaiscott
@zaiscott 2 года назад
@@dalegriffiths3628 this helped me sooooooo much
@taobowen2016
@taobowen2016 2 года назад
Very nice tutorial! However, I‘m using vs2022 and there is an error when I compile it. It says that unresolved externals "private: static class std::vector __cdecl lve::LvePipeline::readFile(class std::basic_string const &)". I followed vulkan tutorial to setup visual studio environment and I have no idea about this.
@taobowen2016
@taobowen2016 2 года назад
After comparing your code and mine, I eventually realise my error. I implement readFile function with something wrong, my poor c++ >_
@BrendanGalea
@BrendanGalea 2 года назад
glad you were able to figure it out, c++ code to debug can be tricky at times :p
@jonj4040
@jonj4040 2 года назад
How were your files organized? I'm having trouble getting the .bat file to run and create the spv files for the shader.
@averagecornenjoyer6348
@averagecornenjoyer6348 2 года назад
little thing I'd like to say, including iostream makes including string unnecessary, correct me if I'm wrong
@BrendanGalea
@BrendanGalea 2 года назад
I did not know that! Thanks :)
@Nikola95inYT
@Nikola95inYT 5 месяцев назад
I'm currently learning C++ and I can say that enables basic input/output in the console. So you can write into buffer or output to console basic types: chars, ints, floats, etc. The same with arrays, though chars need to be terminated with '/0' symbols at the end. introduces a new type of object, it's type declaration begins with "std::string". It has its own set of methods, which makes operations with strings much easier. Without you cannot initialize strings as objects of std::string class, and you have to deal with them as an array of chars, as well as managing memory for them yourself.
@codethinki
@codethinki Год назад
removing the " symbol is only counterproductive because paths with spaces are no more one path instead they will be treated as two seperate arguments.
@coderflower
@coderflower 11 месяцев назад
16:08 Video glitches
@koki10190
@koki10190 Год назад
why does vulkan litearlly look mcuh simpler than opengl
@stpedro-ht9ng
@stpedro-ht9ng Год назад
It's more modern. I really wish more learning resources would be available for Vulkan. OpenGL has much more.
@nyzss
@nyzss 3 года назад
this is a bit embarrassing but if you get a "Debug Error -Abort() Has Been Called" error you may want to check line 15 in your lve_pipeline.cpp and make sure you typed "std::ifstream" and not "std::fstream". i didnt know what was causing this for atleast 30 minutes lmao
@BrendanGalea
@BrendanGalea 3 года назад
thanks for sharing! We’ve all been there lol😣
@tomatrix7525
@tomatrix7525 3 года назад
This feels like a skillshare video or something that you just payed $10 for.
@damiengates7581
@damiengates7581 Год назад
Better
@EvenStar303
@EvenStar303 2 года назад
Who can remember all this shit???
@BrendanGalea
@BrendanGalea 2 года назад
Lol it’s definitely a steep learning curve
@EvenStarLoveAnanda
@EvenStarLoveAnanda 2 года назад
@@BrendanGalea I see that so I am not even gonna try to learn this shit and wreck my brain......
@andreyVK_D3D
@andreyVK_D3D 3 года назад
Vulkan forever, OpenGL must die. WE have no any reason to use GLSL for Vulkan, because HLSL more better and can be used for all platforms including Game consoles and even Android
@BrendanGalea
@BrendanGalea 3 года назад
Well both glsl and hlsl are compiled to spir-v so I think it works just as well for platform compatibility. I don’t have experience with hlsl so I just stuck with what I know for the tutorials.
@EvenStar303
@EvenStar303 2 года назад
This should not be so complicated. Why does everyone have to recreate the vertex pipeline? I should just be able to call on this object and send it some vertex data and have it displayed immediately. What the fuck is wrong with you people.??? In the 21st Century we still write tedious code like this? WTF??? In MAX-MSP, you just load an jit.world openGL objects and it works out of the box. I wanna create something like MAX-MSP but better, that is why I am looking at this stuff. But all this shit is so complicated and incomprehensible, that I see no use in it.
@BrendanGalea
@BrendanGalea 2 года назад
Hahaha ya it’s a good point. Depending on what you want to accomplish vulkan can be a really poor choice. But with all the explicitness comes very fined grained control allowing for techniques and optimization that other platforms just isn’t possible.
@EvenStarLoveAnanda
@EvenStarLoveAnanda 2 года назад
@@BrendanGalea OK, so this fine grained control should be used to create a higher level object that anyone can use. Otherwise the whole thing is useless for the masses. And then how much of this software they gonna sell. 15 seats??? Good luck making money with that!!!
@krisp-
@krisp- 2 года назад
I get this error: terminate called after throwing an instance of 'std::runtime_error' what(): failed to open file: shaders/simple_shader.vert.spv [1] 126026 IOT instruction (core dumped) ./VulkanTest I've tried using absolute paths, recompiling and remaking everything, I still get the same error even with absolute paths. I'm very new to vulkan and graphics APIs in general so I'm not sure what the issue might be? I'm on an arch based Linux distro if it helps.
@BienglikeClark
@BienglikeClark 3 года назад
Hello, I’m enjoying the tutorial, but I’m getting an error for the simple_shader.vert file “gl_VertexIndex is undeclared identifier error #143”, and error #166 “integer expression required: []” I think it might have led to an unhandled exception and my build happening at the throw std::runtime_error(“failed” + filepath); I’m on visual studio 2019, do you know why this main line in simple_shader.vert has multiple errors?
@BrendanGalea
@BrendanGalea 3 года назад
I think it might be you’re trying to compile the shader files as part of the c++ program. They’re compiled separately with glslc and read in at runtime. Or what’s also common is the filepath is incorrect if you’re getting an error at runtime. In that case try using an absolute path rather than a relative path
@BienglikeClark
@BienglikeClark 3 года назад
Brendan Galea so i made it an absolute path and that got rid of the errors. I excluded the simple_shader files and .bat so they wouldn’t compile, but it still fails on build with an unhandled exception thrown in the lve_pipeline.cpp at the throw line. Should i try downloading the git files and compiling with those?
@BienglikeClark
@BienglikeClark 3 года назад
It is definitely still the simple shader files being compiled on build! If I’ve already excluded from the project, how do i fix this.
@BrendanGalea
@BrendanGalea 3 года назад
I’m not positive since I rarely use visual studio but I think you should be able to right click on the shaders folder and there will be an option to exclude from project
@Bryan-bh7cy
@Bryan-bh7cy 2 года назад
For people who are writing the bash script, I got one that's more flexible, it'll compile all of the vert and frag files in the compile.sh directory Script: #!/bin/zsh # loop through vert and frag file for i in *.{vert,frag}; do echo "Processing: " "$i" "${i}.spv"; glslc "$i" -o "${i}.spv"; done
@BrendanGalea
@BrendanGalea 2 года назад
thanks for sharing!!
Далее
How Real Time Computer Graphics and Rasterization work
10:51
Дарю Самокат Скейтеру !
00:42
Просмотров 583 тыс.
GDC 2018   Getting explicit How Hard is Vulkan really
1:01:03
Introduction to shaders: Learn the basics!
34:50
Просмотров 296 тыс.
ALL IT TAKES... A Vulkan Story
29:10
Просмотров 127 тыс.
WebGPU :: Rendering the future in Real-Time
17:03
Просмотров 194 тыс.
Vulkan Graphics Pipeline Components
28:44
Просмотров 9 тыс.