Graphics Pipeline Overview - Vulkan Game Engine Tutorial 02

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024

ความคิดเห็น • 239

  • @MenchenFive
    @MenchenFive 3 ปีที่แล้ว +227

    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 ปีที่แล้ว +31

      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 6 วันที่ผ่านมา

      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 ปีที่แล้ว +93

    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

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

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

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

  • @sethmoore5903
    @sethmoore5903 9 หลายเดือนก่อน +5

    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.

  • @phannguyenthanhtung8600
    @phannguyenthanhtung8600 3 ปีที่แล้ว +1

    the greatest graphic pipeline guide i've ever seen!

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

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

  • @kensclark
    @kensclark 9 หลายเดือนก่อน

    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!

  • @AmaanHasanDilawar
    @AmaanHasanDilawar 2 ปีที่แล้ว +1

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

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

  • @duduken20
    @duduken20 2 ปีที่แล้ว +1

    Just thank you for your service and product quality!

  • @ozgurpeynirci4586
    @ozgurpeynirci4586 3 ปีที่แล้ว +18

    This is an extremely beautiful series of tutorials.

  • @victornigel7367
    @victornigel7367 3 ปีที่แล้ว +1

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

  • @lilakouparouko1832
    @lilakouparouko1832 3 ปีที่แล้ว +9

    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 !

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

  • @dmitrykolesnikovich
    @dmitrykolesnikovich 3 ปีที่แล้ว +1

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

  • @AntoineViallonDevelloper
    @AntoineViallonDevelloper 3 ปีที่แล้ว +1

    Subscribed. Extremely promissing channel.

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

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

  • @federicotorres6227
    @federicotorres6227 8 หลายเดือนก่อน

    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

  • @dalethepalemale6855
    @dalethepalemale6855 3 ปีที่แล้ว +8

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

  • @Antimony-ing
    @Antimony-ing 10 หลายเดือนก่อน +1

    Underatted 💯%

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

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

  • @keinplan9058
    @keinplan9058 ปีที่แล้ว +2

    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?

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

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

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

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

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

  • @shiftingsandsgames
    @shiftingsandsgames ปีที่แล้ว

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

  • @cnsujeer
    @cnsujeer 3 ปีที่แล้ว +2

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

  • @jamesrivettcarnac
    @jamesrivettcarnac 3 ปีที่แล้ว +4

    This is the clearest series I've seen.

  • @andreyVK_D3D
    @andreyVK_D3D 3 ปีที่แล้ว +2

    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 ปีที่แล้ว +2

      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.

  • @Parker8752
    @Parker8752 6 หลายเดือนก่อน +1

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

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

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

  • @appletime101
    @appletime101 ปีที่แล้ว +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?

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

  • @evelyn.exe_
    @evelyn.exe_ ปีที่แล้ว +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  ปีที่แล้ว +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_ ปีที่แล้ว

      @@BrendanGalea that worked thanks!

    • @mexicano1891
      @mexicano1891 10 หลายเดือนก่อน

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

    • @meowmeowcatcat8
      @meowmeowcatcat8 หลายเดือนก่อน

      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.

  • @tomatrix7525
    @tomatrix7525 3 ปีที่แล้ว +2

    This feels like a skillshare video or something that you just payed $10 for.

  • @Adam-vt8ej
    @Adam-vt8ej 2 ปีที่แล้ว +2

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

    • @BrendanGalea
      @BrendanGalea  2 ปีที่แล้ว +2

      VS code. I really like it!

  • @BinaryAgent66
    @BinaryAgent66 3 ปีที่แล้ว +2

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

    • @BrendanGalea
      @BrendanGalea  3 ปีที่แล้ว +1

      Thank you! More to come!

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

  • @giorgilataria8164
    @giorgilataria8164 ปีที่แล้ว +2

    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

  • @reznoflovaniak2873
    @reznoflovaniak2873 ปีที่แล้ว +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  ปีที่แล้ว

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

  • @SherlokGnomes
    @SherlokGnomes 2 หลายเดือนก่อน

    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.

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

  • @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 2 ปีที่แล้ว +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?

  • @NavjotSingh-dy4iu
    @NavjotSingh-dy4iu 9 หลายเดือนก่อน

    Thank you!!

  • @ietsization
    @ietsization 3 ปีที่แล้ว +1

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

  • @brohogany9920
    @brohogany9920 3 ปีที่แล้ว +6

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

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

  • @goncalosoares8483
    @goncalosoares8483 3 ปีที่แล้ว +1

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

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

  • @gabrieldowling6655
    @gabrieldowling6655 7 หลายเดือนก่อน

    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.

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

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

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

  • @dclxviclan
    @dclxviclan 2 ปีที่แล้ว +1

    Academic style, i love this

  • @matanmigdal7108
    @matanmigdal7108 2 ปีที่แล้ว +1

    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!

  • @salieridr9730
    @salieridr9730 5 หลายเดือนก่อน

    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!

  • @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 7 หลายเดือนก่อน +1

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

  • @andysfaleshi2884
    @andysfaleshi2884 ปีที่แล้ว +2

    my cmd says shaders\simple_shader.vert and frag theres no such directory

    • @BrendanGalea
      @BrendanGalea  ปีที่แล้ว +1

      Try using an absolute path. If you’re using visual studio when running the program it’s running it from a different location which will mess up relative paths

  • @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 8 หลายเดือนก่อน

      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.

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

  • @m3taldragon1
    @m3taldragon1 8 หลายเดือนก่อน

    The fact that you did all this without CMake is amazing... I would've automated things like shader compilation from the start

  • @eranzecharia
    @eranzecharia 3 ปีที่แล้ว +1

    Amazing tutorial, thank you!

  • @ИльдарБулатов-т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)

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

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

  • @Bryan-bh7cy
    @Bryan-bh7cy 3 ปีที่แล้ว +8

    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

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

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

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

  • @Yusufbek-gp2qp
    @Yusufbek-gp2qp 2 หลายเดือนก่อน

    This is a gem! 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.

  • @leocomerford
    @leocomerford 2 ปีที่แล้ว

    The full series of tutorial videos: th-cam.com/video/Y9U9IE0gVHA/w-d-xo.html

  • @10bokaj
    @10bokaj 10 หลายเดือนก่อน

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

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

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

  • @may8049
    @may8049 2 ปีที่แล้ว

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

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

  • @aydnbilgin1627
    @aydnbilgin1627 2 ปีที่แล้ว

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

  • @dedem1th
    @dedem1th ปีที่แล้ว

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

  • @damondouglas
    @damondouglas 11 หลายเดือนก่อน

    Thank you for making these videos.

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

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

  • @geegee306
    @geegee306 ปีที่แล้ว

    How to make presentatation picture?

  • @RodrigoRalha
    @RodrigoRalha 2 หลายเดือนก่อน

    I get the error: validation layer: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x5dd9de05b670, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: Invalid SPIR-V magic number. in video 5

  • @nyzss
    @nyzss 3 ปีที่แล้ว +2

    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😣

  • @coderflowerdev
    @coderflowerdev ปีที่แล้ว

    16:08 Video glitches

  • @zbl2550
    @zbl2550 ปีที่แล้ว

    excellent video, benefit a lot

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

  • @jahjae
    @jahjae 2 ปีที่แล้ว

    Thank for sharing the idea

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

  • @no-lifenoah7861
    @no-lifenoah7861 ปีที่แล้ว

    pretty good