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.
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.
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 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.
@@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.
@@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).
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
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...
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.
@@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.
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.
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
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?
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
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
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.
I honestly like the length of these episodes. I certainly wouldn't be bothered if you kept doing episodes of this length.
same. im loving his work
Wow, the gun example is impressive!
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.
I wanna give a huge thank you to "You!".
Love this series, I hope you do a serie about vulcan or direct3d12
Been following this series on Java + LWJGL, can't wait to get to the gun part ;)
you a g
Can't wait to get to the algorithms behind more complicated lighting and rendering!
just watched your sparky engine series :)) love it
Damn. That triangle went staright up aurora borealis.
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.
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
make it anyways the more content on youtube the better :)
Cant wait for more open GL videos
"Hmm I wonder why this episode is so long..."
5 minutes later...
"Ah... balls..."
yay! Now my triangle gets drawn successfully :O
yeah some opengl implementations don't have a default shader so you have to write one (he mentioned that in the OpenGL series)
That intro tho!
The first 3 seconds made me extremely uncomfortable.
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
That intro might be my favorite intro of any youtube channel
@@r.f.mineguy7715 "I don't wanna waste your time so there won't be an intro"
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.
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.
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.
@@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.
@@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.
@@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).
WHATS UP GUYS!!!! Much love from Wales Cherno!
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
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...
He works at EA
@@mohamedelidrissi2839 He learned most of it (maybe even all) before that.
@@pooria_garrett3020 yeah, well working for a big company like EA you'd be constantly learning new things
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.
@@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.
thanks!!!
That demo needs some AA. Can I request TSSAA? I'm quite interested in that one.
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.
it's visual assist x plugin
What color theme are you using in visual studio?
BTW the current one looks like the default visual assist color theme.
Why ImGui and not Qt?
Because Qt is very huge. He said he needs something lighter.
he said he needs a simpler software. unlike Qt which is very big
Eyyy finally
pls I mean pls make a video about the graphics pipeline
When is the directx series coming
@@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.
@@tarunchand3159 thats a really good recommendation. Thanks a bunch
nice :D. what coding style are you followed?
Omg thumbnail make me think that You drank the poison 😂
Since I watched your previous video that talked about wedding life
Any chance that you'll setup clang format sometime soon?
nice nice : D
Oh my Balls
I see you are using visual studio 2019, is it better than 2017?
KuppLe Certainly
it's slower on my machine.
@@sonmai3526 it's faster on mine than 2017 :O
Wow cool video, thanks for sharing cherno.
Before 500 views.
Do. A. Full. Test. Of. The . ENGINE
Can we have some intermediate language to automatically generate shader code?
Like Node based system...
@ 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 🙄
@@shenglongx I'm not following the series anymore
@@shenglongx Seems like he's still 2D only
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
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?
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
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
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.
continue from opengl xD
OpenGL is yesterdays news. If you are building a new game engine now, you should only care about Vulkan.
Many people tried to do a series on vulkan.
Many people failed.
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.