Graphics Pipeline Overview - Vulkan Game Engine Tutorial 02

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 247

  • @MenchenFive
    @MenchenFive 3 роки тому +233

    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 роки тому +33

      Thank you, much appreciated!

    • @crimsonalucard
      @crimsonalucard 3 роки тому +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 роки тому +1

      @@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 роки тому +13

      @@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.

    • @mili1122448816
      @mili1122448816 2 місяці тому

      Just came here to say - it's been 3 years and this comment has now proven to be right :) congrats on your views and subscribers!

  • @valentinzacarias7673
    @valentinzacarias7673 3 роки тому +94

    I cant belive this content is free, this series are amazing, thanks for this, and for making internet a better place.

    • @BrendanGalea
      @BrendanGalea  3 роки тому +16

      Thank you, that means a lot to me!

    • @Vengiism
      @Vengiism 3 роки тому

      Amazing stuff Hold this sub

  • @sethmoore5903
    @sethmoore5903 11 місяців тому +8

    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.

  • @ozgurpeynirci4586
    @ozgurpeynirci4586 3 роки тому +18

    This is an extremely beautiful series of tutorials.

  • @ElZafro_
    @ElZafro_ 3 роки тому +28

    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 роки тому +2

      Thank you!! Glad you’re enjoying the series so far

  • @redsteph
    @redsteph 3 роки тому +9

    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 роки тому +4

      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!

  • @Juan-jc6oc
    @Juan-jc6oc 2 роки тому +3

    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!

  • @jamesrivettcarnac
    @jamesrivettcarnac 3 роки тому +4

    This is the clearest series I've seen.

  • @lucaaaa6382
    @lucaaaa6382 Рік тому +1

    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.

  • @pchpchpch
    @pchpchpch 3 роки тому +8

    Thank you for the tutorial series! This is really good stuff. You're easy to understand, concise, and informative. Keep it up!

  • @cnsujeer
    @cnsujeer 3 роки тому +2

    Finally, something that beginners (like me) can understand. Thanks mate!

  • @stanleywinata9922
    @stanleywinata9922 2 роки тому +1

    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.

  • @StarContract
    @StarContract 3 роки тому +2

    The best Vulkan series, absolute mad lad

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      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 2 роки тому

      @@BrendanGalea the way you lay out the pipeline is so concise that this is probably the best place to start

  • @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

  • @salieridr9730
    @salieridr9730 7 місяців тому

    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!

  • @jordifrias8829
    @jordifrias8829 18 днів тому

    I am learning Vulkan thanks to you. Thanks a lot! Really really nice series.

  • @phannguyenthanhtung8600
    @phannguyenthanhtung8600 3 роки тому +1

    the greatest graphic pipeline guide i've ever seen!

  • @VoylinsLife
    @VoylinsLife 2 роки тому +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!

  • @kensclark
    @kensclark 10 місяців тому

    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!

  • @tylersage4750
    @tylersage4750 Місяць тому

    I just discovered this channel and i finally got through episode 0 and 1 over two days.
    I haven't programmed anything in 6 years. Kinda rusty on the fundamentals, but i think im following along okay sofar.
    Definitely gonna need to study the basics of c++ while im doing this series.

  • @dedem1th
    @dedem1th Рік тому

    How this content is free!! can't believe it, hope you stay healthy

  • @AmaanHasanDilawar
    @AmaanHasanDilawar 2 роки тому +1

    This what I was looking for years...Thank you ♥♥

  • @m3taldragon1
    @m3taldragon1 10 місяців тому

    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 роки тому +6

    Half way to drawing our first triangle you say. This is going faster than I thought!

  • @victornas91
    @victornas91 3 роки тому +1

    Just thank you for your service and product quality!

  • @AntoineViallonDevelloper
    @AntoineViallonDevelloper 3 роки тому +1

    Subscribed. Extremely promissing channel.

  • @may8049
    @may8049 2 роки тому

    and at that moment, he knew, he just f....
    ........ound a legendary channel.

  • @Adam-vt8ej
    @Adam-vt8ej 3 роки тому +2

    Best tutorial on UA-cam!!!
    What is this IDE used during this tutorial?

  • @cprn.
    @cprn. Рік тому +6

    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. 🖤

  • @FlyMandi
    @FlyMandi 8 годин тому

    For you windows folks' getting the exception thrown, you might want to try setting absolute paths at 19:33. Windows and relative paths that aren't environment variables can very easily cause trouble.

  • @goncalosoares8483
    @goncalosoares8483 3 роки тому +1

    These videos are amazing, good job and keep up the good work.

  • @victornigel7367
    @victornigel7367 3 роки тому +1

    Thank you very much for the Tutorials! You are very good at explaining!

  • @mesofreak
    @mesofreak 3 роки тому +2

    hey i just found this video, the tutorials are extremely helpful! Thank you for putting effort into the documentation and timestamps!

  • @dmitrykolesnikovich
    @dmitrykolesnikovich 3 роки тому +1

    Great explanation, thanks for sharing your ecpirience with all of us

  • @ietsization
    @ietsization 3 роки тому +1

    Thanks for making these! :) Just got done with the triangle tutorial but this definitely helps to understand it better

  • @gabrieldowling6655
    @gabrieldowling6655 9 місяців тому

    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.

  • @dawid4450
    @dawid4450 2 роки тому +3

    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

  • @BinaryAgent66
    @BinaryAgent66 3 роки тому +2

    Agreed. Just found this. Very well put together. Keep going! Please :)

  • @lilakouparouko1832
    @lilakouparouko1832 3 роки тому +10

    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 !

  • @abarry6002
    @abarry6002 3 роки тому +1

    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 :)

  • @aydnbilgin1627
    @aydnbilgin1627 2 роки тому

    Thanks dude...It helps alot especially on beginners like

  • @Yusufbek-gp2qp
    @Yusufbek-gp2qp 4 місяці тому

    This is a gem! Thank you

  • @dalethepalemale6855
    @dalethepalemale6855 3 роки тому +8

    On arch linux, the glslc file is included in the "shaderc" package

  • @damondouglas
    @damondouglas Рік тому

    Thank you for making these videos.

  • @RemyDrijkoningen
    @RemyDrijkoningen 3 роки тому +4

    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 роки тому +5

      I draw them using procreate on an iPad, and then transitions are edited in DaVinci resolve

  • @dclxviclan
    @dclxviclan 2 роки тому +1

    Academic style, i love this

  • @affepaffe420
    @affepaffe420 2 роки тому +6

    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)

  • @igd1591
    @igd1591 3 роки тому +10

    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 роки тому +1

      @@BrendanGalea Sorry, my fault. I was watching late and it seemed you wrote curly braces.

  • @dalegriffiths3628
    @dalegriffiths3628 3 роки тому +2

    Great videos, love your clear presentation style - Brendan do you mind me asking your background?, you are so knowledgeable!

    • @BrendanGalea
      @BrendanGalea  3 роки тому +9

      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.

  • @federicotorres6227
    @federicotorres6227 10 місяців тому

    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

  • @eranzecharia
    @eranzecharia 3 роки тому +1

    Amazing tutorial, thank you!

  • @Antimony-ing
    @Antimony-ing Рік тому +1

    Underatted 💯%

  • @appletime101
    @appletime101 2 роки тому +1

    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?

  • @jan-u7g4r
    @jan-u7g4r 6 днів тому

    in windows you can directly call it since it's already in the env variable

  • @Parker8752
    @Parker8752 8 місяців тому +1

    On linux, I kept getting errors opening the shader files - adding std::ios::in to the flags fixed this.

  • @immanuelc885
    @immanuelc885 3 роки тому +1

    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.

  • @robbeflot5428
    @robbeflot5428 Місяць тому

    when I try to compile the shaders (on windows) I get the following error Error: no binary generation requested (e.g., -V) (use -h for usage) I can't seem to figure out how to solve this problem.

  • @shiftingsandsgames
    @shiftingsandsgames Рік тому

    wow what a great job! thank you so much!
    with the help of ChatGPT my understanding of these fundamentals increased tenfold.

  • @keinplan9058
    @keinplan9058 Рік тому +5

    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?

    • @readme-exe
      @readme-exe 3 дні тому

      I think this has already been solved, but I'll leave it here in case someone else needs it.
      The following possibilities are considered, the file is in the wrong working directory, incorrect path, or both.
      You can check the working directory with the code below.(This code requires )
      std::cout

  • @jacksamurai9946
    @jacksamurai9946 2 роки тому +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?

  • @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!

  • @szabotudor
    @szabotudor 2 роки тому +3

    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 роки тому +6

      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 роки тому +3

      Glad you figured it out so quickly!

  • @AbdulAziz-uo8bk
    @AbdulAziz-uo8bk 3 роки тому +3

    Can anyone tell me which software are using for this presentation . I really need this types presentation software for planning..

    • @BrendanGalea
      @BrendanGalea  3 роки тому +4

      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.

  • @zbl2550
    @zbl2550 Рік тому

    excellent video, benefit a lot

  • @mostafaghobashy2724
    @mostafaghobashy2724 Місяць тому

    guys, I have been a c/opengl dev for a long time. I wanted to upgrade to vulcan, so I started writing cpp. I noticed that the readFile returns a vector of char. Why can't it return an std::string?

  • @XiaoZong322
    @XiaoZong322 2 роки тому

    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.

  • @evelyn.exe_
    @evelyn.exe_ 2 роки тому +3

    I followed the tutorial but when running the program I get the error “failed to open file: shaders/simple_shader.vert.spv”.

    • @BrendanGalea
      @BrendanGalea  2 роки тому +1

      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_ 2 роки тому

      @@BrendanGalea that worked thanks!

    • @mexicano1891
      @mexicano1891 Рік тому

      You say full path is place the full path and after -o full path again but executable. I don't undestend?

    • @meowmeowcatcat8
      @meowmeowcatcat8 3 місяці тому

      If anyone runs into the issue and is in an IDE, I found a solution that worked for me. IDEs compile and send the .exe to a specific folder. Your path must be relative to that location.
      For Visual Studio, check the project properties by right-clicking the project in the solution explorer and click Properties. From there, go under Configuration Properties and General. Look at the path in Output Directory. That is where the .exe goes and thus it is the path from which the shader path is relative.

    • @lelomizuki5251
      @lelomizuki5251 Місяць тому

      @@meowmeowcatcat8 Hello, I read your comment 10 times and I still don't understand it, could you be a little more specific in the final part?
      Should I put the .exe in that folder or should I configure the folder to run from where the video explains?

  • @yaircambordamorocho4506
    @yaircambordamorocho4506 3 роки тому +1

    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 роки тому +1

      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 роки тому +1

      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 роки тому +1

      @@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.

  • @jonj4040
    @jonj4040 2 роки тому +1

    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 роки тому +1

      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 2 роки тому +1

      @@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 ? :)

  • @jahjae
    @jahjae 2 роки тому

    Thank for sharing the idea

  • @sekaus9158
    @sekaus9158 3 роки тому +1

    can I give you guys a tip to understand something like vertex? try to use Blender this can help you understand batter

  • @Fidelity_Investments
    @Fidelity_Investments 3 роки тому +3

    god this man moves fast

    • @BrendanGalea
      @BrendanGalea  3 роки тому +1

      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 роки тому +2

      @@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 роки тому +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.

  • @reznoflovaniak2873
    @reznoflovaniak2873 2 роки тому +1

    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  2 роки тому

      Easiest solution would be to use the absolute path. So like C:/users/…/simpleshader.vert

  • @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 :)

  • @SherlokGnomes
    @SherlokGnomes 4 місяці тому

    Hey, has anyone tried this lesson on linux with wayland? I have transparent window without control elements and don't know if this is normal or not.

  • @BSPNode
    @BSPNode 2 роки тому +1

    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 роки тому +1

      Ya at this point I wouldn’t be too concerned yet. Your file might just have some extra whitespace characters or something like that.

  • @giorgilataria8164
    @giorgilataria8164 2 роки тому +2

    How do I create .vert file in Visual Studio?

    • @BrendanGalea
      @BrendanGalea  2 роки тому

      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

  • @10bokaj
    @10bokaj Рік тому

    Is 450 required, could I use 3.3 if I also want to use the shader in an opengl context?

  • @shylex7660
    @shylex7660 2 роки тому +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.

  • @tomkimsour
    @tomkimsour 3 роки тому +1

    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 роки тому +1

      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 роки тому +1

      @@BrendanGalea absolute worked thanks also another way around was to change my ide environment build path.

  • @MosKarck
    @MosKarck Рік тому +1

    my .vert file is not linking to the project al lthe code is jsut plain text if i write anything. VS2022

    • @kepcukhusamettin9400
      @kepcukhusamettin9400 Рік тому +1

      hey did you find a solution

    • @mr.raider744
      @mr.raider744 8 місяців тому +1

      @@kepcukhusamettin9400 well im a little late, but try installing GLSL language integration and see if it fixes it

  • @kacperxt371
    @kacperxt371 3 роки тому +2

    I'm using visual studio 2019 and I have a little problem with file extension.

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      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 3 роки тому

      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 3 роки тому

      @@BrendanGalea never mind! I just didn't install GLSL language integration.

    • @arthurklause5251
      @arthurklause5251 2 роки тому

      @@kacperxt371 I had the same issue thx !!

  • @matanmigdal7108
    @matanmigdal7108 3 роки тому +1

    hi can you show how to automate the shader compile whit shaderc lib?

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      Don’t have that currently planned for the tutorial series, sorry!

  • @geegee306
    @geegee306 Рік тому

    How to make presentatation picture?

  • @PabloTheDolphin
    @PabloTheDolphin 3 роки тому +2

    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 3 роки тому +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?

  • @codethinki
    @codethinki 2 роки тому

    removing the " symbol is only counterproductive because paths with spaces are no more one path instead they will be treated as two seperate arguments.

  • @ИльдарБулатов-т4х
    @ИльдарБулатов-т4х 3 роки тому +1

    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  3 роки тому +1

      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

    • @ИльдарБулатов-т4х
      @ИльдарБулатов-т4х 3 роки тому +1

      @@BrendanGalea благодарю) translation thank you)

  • @sebastianrichter8054
    @sebastianrichter8054 3 роки тому +1

    is there a deeper reason why the coordinate system is so different and why vulkan uses not a cartesian system?

    • @BrendanGalea
      @BrendanGalea  3 роки тому +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 3 роки тому

      @@BrendanGalea maybe i should have called it "standard cartesian system" because the quadrants are rotated clockwise by 90 degrees.. i will read it. thanks!

  • @novacaine_.5108
    @novacaine_.5108 3 роки тому +2

    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

  • @averagecornenjoyer6348
    @averagecornenjoyer6348 3 роки тому +1

    little thing I'd like to say, including iostream makes including string unnecessary, correct me if I'm wrong

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      I did not know that! Thanks :)

    • @Nikola95inYT
      @Nikola95inYT 10 місяців тому

      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.

  • @taobowen2016
    @taobowen2016 2 роки тому +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.

  • @gamerun5480
    @gamerun5480 3 роки тому +1

    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.

  • @NavjotSingh-dy4iu
    @NavjotSingh-dy4iu 11 місяців тому

    Thank you!!

  • @xr.spedtech
    @xr.spedtech 3 роки тому +1

    Any video editor like that for windows ?

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      Yes I use DaVinci resolve to edit the videos

  • @no-lifenoah7861
    @no-lifenoah7861 Рік тому

    pretty good

  • @dmitrykolesnikovich
    @dmitrykolesnikovich 3 роки тому

    Do you have idea how to use GLSL with Metal ?

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      No sorry, I’ve no direct experience with Metal

  • @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 роки тому +2

      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 роки тому +2

      @@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

  • @leocomerford
    @leocomerford 2 роки тому

    The full series of tutorial videos: ua-cam.com/video/Y9U9IE0gVHA/v-deo.html

  • @koki10190
    @koki10190 2 роки тому +1

    why does vulkan litearlly look mcuh simpler than opengl

    • @spht9ng
      @spht9ng 2 роки тому

      It's more modern. I really wish more learning resources would be available for Vulkan. OpenGL has much more.

  • @nyzss
    @nyzss 3 роки тому +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😣