OpenGL Shaders | Game Engine series

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 83

  • @Skovisen
    @Skovisen 5 лет назад +94

    I honestly like the length of these episodes. I certainly wouldn't be bothered if you kept doing episodes of this length.

  • @Berzeger
    @Berzeger 5 лет назад +25

    Wow, the gun example is impressive!

  • @movax20h
    @movax20h 3 года назад +8

    The variables you pass between vertex and fragment shader are still called varying or flat. The one that are varying will be interpolated from 3 corners of the triangle to be accessible to every pixel of the fragment shader, usually a linear interpolation with perspective correction will be applied, but it is also possible to use barycentric interpolation. The flat is where only one of the 3 outs from the vertex would be used by the fragment shader. So i.e. if you pass the colors, it is easy to see that varying will produce "varying shading" / smooth shading (sometimes called Grouraud shading, which is not fully correct, due to different type of interpolation used; or more complex shading depending on what you do in the fragment shading), compared to flat producing a "flat shading", a old school style, you can recognize from some old computer animations, but they could be also useful in some situations. When using flat shading, the vertex that would be used for the whole triangle, is called provoking triangle. This is still supported in modern OpenGL and Vulkan and DirectX, but definitions are slightly different, so that might be very confusing to debug or port.
    Some people might confuse varying variables, with something being inverse of uniform attributes. This is not really true. Uniforms can only be used as inputs (to vertex and fragment shaders), and they are input from outside. While varying / flat are to communicate between shaders. A better understanding of uniforms is to think of them as globals, while inputs are local. I.e. globals like time equal ("uniform") for all vertices and pixels. While locals, might be individual elements from the vertex arrays.

  • @AnouarELHARRAK
    @AnouarELHARRAK Год назад +2

    I wanna give a huge thank you to "You!".
    Love this series, I hope you do a serie about vulcan or direct3d12

  • @kelvinrawson1729
    @kelvinrawson1729 2 года назад +2

    Been following this series on Java + LWJGL, can't wait to get to the gun part ;)

  • @Puddlestomps
    @Puddlestomps 5 лет назад +7

    Can't wait to get to the algorithms behind more complicated lighting and rendering!

  • @ThanhNguyen-sl2kd
    @ThanhNguyen-sl2kd 5 лет назад +7

    just watched your sparky engine series :)) love it

  • @milo20060
    @milo20060 2 года назад +1

    Damn. That triangle went staright up aurora borealis.

  • @vedantchaudhari7123
    @vedantchaudhari7123 5 лет назад +6

    i dont look at ur code at all, im gonna just go through ur OpenGL series, probably a couple times, then i just listen what u say, then start my own engine. if i manage to make anything remotely close to ur final result, call me GOD.
    Edit: I do already have a decent amount of experience in this.

  • @azarus8806
    @azarus8806 5 лет назад +3

    I was going to make my own how to make java games. But you're too good at what you do so I don't want to compete XD

    • @tx6723
      @tx6723 5 лет назад +4

      make it anyways the more content on youtube the better :)

  • @TheNewRezy
    @TheNewRezy 5 лет назад +2

    Cant wait for more open GL videos

  • @hadjiss
    @hadjiss 4 года назад +11

    "Hmm I wonder why this episode is so long..."
    5 minutes later...
    "Ah... balls..."

  • @IlliaZhdanov
    @IlliaZhdanov Год назад +1

    yay! Now my triangle gets drawn successfully :O

    • @Brad_Script
      @Brad_Script 9 месяцев назад

      yeah some opengl implementations don't have a default shader so you have to write one (he mentioned that in the OpenGL series)

  • @saeenyoda
    @saeenyoda 5 лет назад +5

    That intro tho!

  • @kemptcode
    @kemptcode 5 лет назад +55

    The first 3 seconds made me extremely uncomfortable.

    • @furkancanturan9904
      @furkancanturan9904 5 лет назад +1

      Yeah, I think it was annoying too! But you can feel the excitement of him when he starts speaking. It is ok, but for once per year :D

    • @r.f.mineguy7715
      @r.f.mineguy7715 4 года назад +3

      That intro might be my favorite intro of any youtube channel

    • @DeusAmentiam
      @DeusAmentiam 4 года назад +1

      @@r.f.mineguy7715 "I don't wanna waste your time so there won't be an intro"

  • @clodgozon3968
    @clodgozon3968 5 лет назад +1

    The fuck is that? That's cool dude. Anyway, you're the first person I saw that records the process how you make the game engine.

  • @Alriightyman
    @Alriightyman 4 года назад +2

    Have you considered creating/writing any unit tests for the engine? I suppose it wouldn't be "entertaining" but it is important; not just for game engines but applications in general. Anyway, this is a very interesting series that I just recently discovered; I really like it! Currently playing catch up right now.

    • @gileee
      @gileee 4 года назад +2

      What would he unit test? The engine doesn't really handle typical user input and he doesn't have any math function to test across ranges.

    • @Alriightyman
      @Alriightyman 4 года назад +1

      @@gileee Just because there isn't any typical input or math doesn't mean there is nothing to unit test. There is always something that could be unit tested. For example, he has an event system that could be unit tested. Plus, he has created a variety of interface like classes that could be mocked out if needed.

    • @gileee
      @gileee 4 года назад +1

      @@Alriightyman An already tried and tested event system and his interfaces are there to clean up the code and a little bit of abstraction. I really don't see the cost vs gain in writing unit tests for setup code like this. Like what will he test in the window class? Did it create a window? Just throw an error if it didn't, you have to anyway since there's nowhere else for the code to go if there's no window.
      And on a separate note, the code could change architecture so much at points, all unit test could be rendered useless. There's software were your functional requirements for code are so strict you can write unit test before the actual code, this obviously isn't such a case.

    • @Alriightyman
      @Alriightyman 4 года назад +1

      @@gileee I get what you are saying. Keep in mind, I wasn't implying he should write Unit tests right now, but rather has he considered creating them. I don't know what this engine looks like right now anyway; I just know what it looks like at this video's state (I haven't peeked ahead yet).

  • @SlipperyBrick89
    @SlipperyBrick89 5 лет назад +2

    WHATS UP GUYS!!!! Much love from Wales Cherno!

  • @anis1930
    @anis1930 5 лет назад +2

    just wanted to know if msaa in its worst case scenario (when for exemple in msaa x4 4 different triangle with 4 different colors meet on top of 4 different sample points of the same pixel) has nearly same performance cost than ssaa x4 because with the msaa x4 worst scenario 4 fragments will be generated just like it would be with ssaa x4

  • @xnorgate5894
    @xnorgate5894 5 лет назад +6

    Cherno, how did you learn to make these engines on your own? I'm thankful I have you to watch to help me get started, but how did you do it? It feels like resources on this topic are really limited...

    • @mohamedelidrissi2839
      @mohamedelidrissi2839 5 лет назад +1

      He works at EA

    • @pooria_garrett3020
      @pooria_garrett3020 5 лет назад +1

      @@mohamedelidrissi2839 He learned most of it (maybe even all) before that.

    • @mohamedelidrissi2839
      @mohamedelidrissi2839 5 лет назад +3

      @@pooria_garrett3020 yeah, well working for a big company like EA you'd be constantly learning new things

    • @rift1067
      @rift1067 4 года назад +1

      It's likely he learned all the technicalities while working at EA. I don't know how recruitment works and to what extent recruits are trained, but my guess is that he had adequate software development experience before joining, and that most of this was taught to him through an initiative training programme. Then there's the thing about knowing to hit the right notes, which should be something he acquired through experience.
      Again, I know nothing about EA beneath the surface and this is all speculation.

    • @tonig2757
      @tonig2757 4 года назад +5

      @@rift1067 To work in the engine team at such company, even as an intern, you are usually required to be at near expert level in C++, have good understanding of how the graphics pipeline in the GPU works and be familiar with at least one graphics API. This is considered basic requirement, so no training program. You can say that, at a AAA company, even interns/juniors of the engine team are around the same level as senior game developers in indie companies.

  • @sam_is_people1170
    @sam_is_people1170 3 года назад

    thanks!!!

  • @nextlifeonearth
    @nextlifeonearth 5 лет назад +1

    That demo needs some AA. Can I request TSSAA? I'm quite interested in that one.

  • @popplestones886
    @popplestones886 2 года назад +1

    When you right click a Class name in a header file you get the option of Quick Actions and Refactoring, then you get a bunch of options including "Create Method Implementations..." I don't get that at all, I only get 3 options, (Change Signature, Create declaration / definition, Implement Pure Virtuals for base Shader, Move definition location). Is it a plugin you are using.

  • @bartomiejkudzia6152
    @bartomiejkudzia6152 5 лет назад +1

    What color theme are you using in visual studio?

    • @anujv2909
      @anujv2909 5 лет назад

      BTW the current one looks like the default visual assist color theme.

  • @juanmartin1905
    @juanmartin1905 5 лет назад +2

    Why ImGui and not Qt?

    • @ShivamJha00
      @ShivamJha00 5 лет назад +2

      Because Qt is very huge. He said he needs something lighter.

    • @vedantchaudhari7123
      @vedantchaudhari7123 5 лет назад +1

      he said he needs a simpler software. unlike Qt which is very big

  • @syne1456
    @syne1456 5 лет назад

    Eyyy finally

  • @giancedrick507
    @giancedrick507 4 года назад

    pls I mean pls make a video about the graphics pipeline

  • @charliecarpo9759
    @charliecarpo9759 5 лет назад +3

    When is the directx series coming

    • @charliecarpo9759
      @charliecarpo9759 5 лет назад +1

      @@tarunchand3159 I've looked before and I'm pretty sure all of the actual directx code is abstracted and it's more of a general graphics series.

    • @ttextinction7273
      @ttextinction7273 5 лет назад +3

      @@tarunchand3159 thats a really good recommendation. Thanks a bunch

  • @haddeadgoogle7158
    @haddeadgoogle7158 5 лет назад +1

    nice :D. what coding style are you followed?

  • @deadyanothaikiropool1chait713
    @deadyanothaikiropool1chait713 5 лет назад +1

    Omg thumbnail make me think that You drank the poison 😂
    Since I watched your previous video that talked about wedding life

  • @WillMcCKill
    @WillMcCKill 5 лет назад

    Any chance that you'll setup clang format sometime soon?

  • @CreativeOven
    @CreativeOven 5 лет назад

    nice nice : D

  • @SimeonRadivoev
    @SimeonRadivoev 5 лет назад +1

    Oh my Balls

  • @anujv2909
    @anujv2909 5 лет назад +4

    I see you are using visual studio 2019, is it better than 2017?

    • @esben181
      @esben181 5 лет назад +2

      KuppLe Certainly

    • @sonmai3526
      @sonmai3526 5 лет назад +2

      it's slower on my machine.

    • @ShivamJha00
      @ShivamJha00 5 лет назад

      @@sonmai3526 it's faster on mine than 2017 :O

  • @kirafortherescue7756
    @kirafortherescue7756 5 лет назад

    Wow cool video, thanks for sharing cherno.

  • @richardlighthouse5328
    @richardlighthouse5328 5 лет назад +1

    Before 500 views.

  • @bubba9276
    @bubba9276 5 лет назад +1

    Do. A. Full. Test. Of. The . ENGINE

  • @kapilverma2668
    @kapilverma2668 5 лет назад +3

    Can we have some intermediate language to automatically generate shader code?
    Like Node based system...

  • @mohamedelidrissi2839
    @mohamedelidrissi2839 5 лет назад +2

    @ 4:30 I feel like he was talking about me, I wrote a similar comment on the last video, was meant to be a joke though 🙄

    • @mohamedelidrissi2839
      @mohamedelidrissi2839 4 года назад

      @@shenglongx I'm not following the series anymore

    • @gileee
      @gileee 4 года назад

      @@shenglongx Seems like he's still 2D only

  • @Murderface666
    @Murderface666 5 лет назад +1

    ImGuilLayer.cpp (OnAttach()) doesn't like DockingEnable & ViewportsEnable (undefined) and End() has a problem with ViewportsEnable, UpdatePlatformWindows() and RenderPlatformWindowsDefault() (Imgui namespace has no member).
    Tried building Hazel for comparison and I get the same errors

  • @sc5shout
    @sc5shout 5 лет назад +2

    Did you cover more topics than just the rendering you showed in the video? 10$ In my country is like 40$, especially if I do not earn any money, I do not want to pay for something I am not interested in at the moment. It'd be nicer if we'd know what topics are already covered.
    Also I am wondering, what if I buy this subscription and it'll expire? Would I still be able to read the part that I had?

    • @Puddlestomps
      @Puddlestomps 5 лет назад +1

      I think you could always clone the repository so then when you stop paying you'll still have the cloned repository on your pc, but you won't be able to update it when new commits are pushed

  • @kirafortherescue7756
    @kirafortherescue7756 5 лет назад +1

    How are we gonna compile the Game project into an executable file? Are we gonna use VS compiler/GCC and so on for each platform? Will our engine depend on them? But the most important question is how even are we even gonna generate the code for compiling? It seems very complicated or I may have missed something

    • @kirafortherescue7756
      @kirafortherescue7756 5 лет назад +1

      I thought of something.. When we want to compile our game project, we'd just need a *main.cpp* file and some resource files for icons/files and etc i.e if the game developer wanted to customize his executable file. And in our main.cpp file, we'll write a function that takes a .json file that contains all the world information and then executes it all at runtime using some function that we've created in our Engine project inside the main.cpp; After that, all we've to do is just link the main.cpp file with the resource file and with our Engine .dll then compile everything using any compiler with command-lines, It'd result in an executable app that reads .json file that contains almost everything about the world and executes all these information at runtime inside the main() function using our Engine API. Of course, we'd add some more functionality to the main.cpp file later; BTW, that was the solution I thought of.

  • @koungmeng
    @koungmeng 5 лет назад +1

    continue from opengl xD

  • @kabasakalis
    @kabasakalis 5 лет назад

    OpenGL is yesterdays news. If you are building a new game engine now, you should only care about Vulkan.

    • @Murderface666
      @Murderface666 5 лет назад +2

      Many people tried to do a series on vulkan.
      Many people failed.

  • @antoniocs8873
    @antoniocs8873 5 лет назад

    Please... can you make a plan of what you are going to say?
    All the "hhhmss" are really killing me, completely breaks my concentration on the subject.