OGLDEV
OGLDEV
  • Видео 107
  • Просмотров 932 570
Uniform Buffers // Vulkan For Beginners #17
In this video we learn how to create uniform buffers in Vulkan and bind them to the graphics pipeline object. We also learn how to integrate a 3D camera into the application.
🔥More details on the 3D camera: ruclips.net/video/KEKcDvS3hDQ/видео.html
🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I will get a small commission (thank-you!).
📚 Timecodes 📚
0:00 Intro
0:39 Changes to the vertex shader
3:06 Changes to the application code
4:26 Creating a uniform buffer
7:21 B...
Просмотров: 759

Видео

Create your own Cubemap // Intermediate OpenGL Series
Просмотров 2,3 тыс.21 день назад
🔥To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OGLDEV/ . You’ll also get 20% off an annual premium subscription. In this video we learn how to convert an Equirectangular Image to a cubemap in OpenGL. The result can then be used for Skybox rendering. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.htm...
Descriptor Sets // Vulkan For Beginners #16
Просмотров 1 тыс.Месяц назад
In this video we learn how to connect a vertex buffer to the graphics pipeline object using a descriptor set and descriptor set layout. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is th...
Vertex Buffers // Vulkan For Beginners #15
Просмотров 1,4 тыс.Месяц назад
🔥To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OGLDEV/ . You’ll also get 20% off an annual premium subscription. In this video we learn how to create vertex buffers in Vulkan. 🔥How to install GLM: ruclips.net/video/KEKcDvS3hDQ/видео.html 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly ...
3D Camera - a GLM Story
Просмотров 2,2 тыс.2 месяца назад
In this video we learn how to create a 3D camera using the GLM library. This camera can be used for both OpenGL and Vulkan. 📚 Timecodes 📚 0:00 Intro 1:18 Background 3:04 Installing GLM 4:46 The camera class 7:16 Matrix/quaternion initialization 8:24 The view matrix 9:53 The perspective projection matrix 10:17 Camera class integration 11:23 Keyboard control 16:10 Calculating the velocity and acc...
Graphics Pipeline Object // Vulkan For Beginner #14
Просмотров 1,9 тыс.2 месяца назад
In this video we will render our first triangle! This will made possible using the Graphics Pipeline Object which will be bound to the command buffer. It will provide all the state required by the draw command (also added in this video). 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about O...
The Endless Grid
Просмотров 4,4 тыс.3 месяца назад
In this video we learn how to create an infinite grid using OpenGL. It is based on an article from the '3D Graphics Rendering Cookbook' (see link below). 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the boo...
Shaders // Vulkan For Beginners #13
Просмотров 2,3 тыс.4 месяца назад
In this video we learn how to create the vertex and fragment shader for our first Vulkan demo. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I will get a small com...
Programmable Vertex Pulling // Intermediate OpenGL Series
Просмотров 3,1 тыс.4 месяца назад
In this video we learn how to get vertices into the vertex shader using the Programmable Vertex Pulling technique. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I ...
Pass me that render, please // Vulkan For Beginners #12
Просмотров 3,9 тыс.5 месяцев назад
In this video we learn how to use the Render Pass and Framebuffer objects. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I will get a small commission (thank-you!)...
Normal Mapping Adventures // OpenGL Intermediate Series
Просмотров 2,7 тыс.5 месяцев назад
In this video we learn how to implement normal mapping, also known as bump mapping. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I will get a small commission (th...
Image Memory Barriers // Vulkan For Beginners #11
Просмотров 2 тыс.6 месяцев назад
In this video we learn how to use Image Memory Barriers in order to transition the layout of the images in the swap chain. This fixes the errors that we saw in the previous tutorial. 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you u...
Submitting Command Buffers // Vulkan For Beginners #10
Просмотров 2 тыс.6 месяцев назад
In this video we learn how to submit command buffers into a Vulkan queue. This will get us the first visual response in Vulkan - the window will finally be cleared... 🔥 See the list of the books that I'm using as background information for my tutorials: ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy a...
The OpenGL Software Ecosystem
Просмотров 11 тыс.7 месяцев назад
The OpenGL Software Ecosystem
Recording the clear command // Vulkan For Beginners #9
Просмотров 1,8 тыс.7 месяцев назад
Recording the clear command // Vulkan For Beginners #9
Buffer Those Commands! // Vulkan For Beginners #8
Просмотров 2,7 тыс.8 месяцев назад
Buffer Those Commands! // Vulkan For Beginners #8
Terrain Tessellation Shaders // Terrain Rendering Episode 13
Просмотров 3,9 тыс.8 месяцев назад
Terrain Tessellation Shaders // Terrain Rendering Episode 13
DJ! Swap that chain!!! // Vulkan For Beginners #7
Просмотров 2,9 тыс.9 месяцев назад
DJ! Swap that chain!!! // Vulkan For Beginners #7
It is illogical (device) // Vulkan For Beginners #6
Просмотров 1,9 тыс.9 месяцев назад
It is illogical (device) // Vulkan For Beginners #6
Let's Get Physical (Device) // Vulkan For Beginners #5
Просмотров 2,8 тыс.10 месяцев назад
Let's Get Physical (Device) // Vulkan For Beginners #5
Creating a Surface Handle // Vulkan For Beginners #4
Просмотров 2,7 тыс.10 месяцев назад
Creating a Surface Handle // Vulkan For Beginners #4
Creating a Debug Callback Function // Vulkan For Beginners #3
Просмотров 3,1 тыс.10 месяцев назад
Creating a Debug Callback Function // Vulkan For Beginners #3
Creating an Instance // Vulkan For Beginners #2
Просмотров 7 тыс.11 месяцев назад
Creating an Instance // Vulkan For Beginners #2
Vulkan For Beginners Tutorial #1
Просмотров 22 тыс.11 месяцев назад
Vulkan For Beginners Tutorial #1
Quad Tessellation // OpenGL Tutorial #51
Просмотров 3,6 тыс.Год назад
Quad Tessellation // OpenGL Tutorial #51
Direct State Access // OpenGL Tutorial #50
Просмотров 5 тыс.Год назад
Direct State Access // OpenGL Tutorial #50
Render a Wireframe On a Solid Mesh // OpenGL Tutorial #49
Просмотров 4,4 тыс.Год назад
Render a Wireframe On a Solid Mesh // OpenGL Tutorial #49
Optimize Your Meshes! // OpenGL Tutorial #48
Просмотров 7 тыс.Год назад
Optimize Your Meshes! // OpenGL Tutorial #48
Introduction To Tessellation // OpenGL Tutorial #47
Просмотров 7 тыс.Год назад
Introduction To Tessellation // OpenGL Tutorial #47
Text Rendering In OpenGL // OpenGL Tutorial #46.2
Просмотров 5 тыс.Год назад
Text Rendering In OpenGL // OpenGL Tutorial #46.2

Комментарии

  • @Amine-gz7gq
    @Amine-gz7gq 14 часов назад

    3D programming is really a tough subject, I thank you for your efforts to make it more accessible... In the days of the playstation 1, there were no shaders. I wonder how a game like crash bandicoot 3 could be programmed, for example (even GTA 3 and the games that use the same engine don't use shaders).

    • @OGLDEV
      @OGLDEV Час назад

      You're welcome! Graphics existed before the programmable pipeline. In the case of OpenGL there was the deprecated pipeline with an API which supported a very specific type of lighting model, fog, etc. Before that sw rasterization was the way to go (Doom, Quake, etc). I'm not an expert on the PS1 but from what I know it had a GPU which provided various rendering effects which allowed you to program very close to the HW. I imagine it was similar to the idea of the deprecated GL pipeline even though the API was probably somewhat different.

  • @dani08sv
    @dani08sv 16 часов назад

    Amazing guide for beginners that complements very well with the LearnOpenGL website, i come to these videos after figuring it out for myself with the website to see if my learning is correct, comparing what i understood reading with the explanations in the videos, thanks

    • @OGLDEV
      @OGLDEV 6 часов назад

      Glad it was helpful!

  • @Amine-gz7gq
    @Amine-gz7gq День назад

    At 18:32, why use the xy attribute of TexCoord0 (what's that anyway?) instead of TexCoord0

    • @OGLDEV
      @OGLDEV День назад

      Texture coordinates are explained in tutorial #16 (texture mapping). Since TexCoord0 is a vec2 then it is indeed equivalent to TexCoord0.xy. I guess I was a bit explicit here.

  • @aprile1710
    @aprile1710 2 дня назад

    I would actually say EGL is multi-platform. It's more dominate on Linux than GLX and works on Windows too.

    • @OGLDEV
      @OGLDEV День назад

      Simply use GLFW... ;-)

    • @aprile1710
      @aprile1710 День назад

      @@OGLDEV No doubt that is simpler. But I prefer to code what I'm able. GLFW is nice but it does a lot I don't need. I don't find creating a window or handling input prohibitively difficult in Linux or Windows. I will say importing all the GL functions manually is pretty unpleasant though. So I am currently using GLAD. At least until I figure out what I need and don't. It's amazing how much simpler OGL is compared to Vulkan. Way nicer to just try stuff out and experiment with.

    • @OGLDEV
      @OGLDEV День назад

      I usually go with simpler if it works out of the box and coding it myself does not provide an actual benefit. That's why I use GLFW, GLEW, Assimp and STB. I coded my own math functions for the tutorials in order to explain 3D math but on a real project I wouldn't mind using GLM.

    • @aprile1710
      @aprile1710 День назад

      @@OGLDEV That's reasonable. It's personal preference.

    • @OGLDEV
      @OGLDEV День назад

      Sure

  • @JuanGarcia-lo2el
    @JuanGarcia-lo2el 2 дня назад

    Hi Friend! thanks for your videos, love them! One question how different is this approach compared with your terrain series? I have not started to see that series.

    • @OGLDEV
      @OGLDEV 2 дня назад

      You're welcome! The endless grid technique doesn't deal with height generation. It uses the distance from the camera to generate a dynamic grid on a flat square. So it's not equivalent to any terrain rendering algorithm.

    • @JuanGarcia-lo2el
      @JuanGarcia-lo2el День назад

      @@OGLDEV Thanks for your explanation, now I understand. and what is de purpose to have and endless grid?

    • @OGLDEV
      @OGLDEV День назад

      Visual debugging, and for implementing a dynamic grid for stuff like Blender, Unity, etc.

  • @Amine-gz7gq
    @Amine-gz7gq 3 дня назад

    1:18 leukemia caused by agent orange spraying in vietnam

    • @OGLDEV
      @OGLDEV 3 дня назад

      Wow, I didn't know that. So tragic. Such a loss.

  • @bogdan_mocanu
    @bogdan_mocanu 3 дня назад

    What kind of performance increase you got when rendering with Frustum Culling?

    • @OGLDEV
      @OGLDEV 3 дня назад

      I haven't measured myself but since this is such a popular technique I assume that there is an increase in performance. Note that the improvement highly depends on the size of the workload and the amount of pressure it puts on the GPU as well as the specifications of the machine. So for each use case you will get a different result.

    • @bogdan_mocanu
      @bogdan_mocanu 3 дня назад

      ​@OGLDEV completely agree with the answer.

    • @OGLDEV
      @OGLDEV 3 дня назад

      Thanks :-)

  • @Amine-gz7gq
    @Amine-gz7gq 4 дня назад

    I'm not a simp so I will not use Assimp 😂On Windows, you can use vcpkg to install 3rd party libraries, it has integration with Visual Studio so you will not need to configure the VS compiler and linker. It also supports CMake. At 19:00, At 19:00, why did you check for a backslash, a Windows separator not used under *nix operating systems?

  • @Amine-gz7gq
    @Amine-gz7gq 4 дня назад

    At 8:14 don't you have to compile the shaders before creating the OGL objects ?

    • @OGLDEV
      @OGLDEV 4 дня назад

      Shader programs and OGL objects are orthogonal in terms of initialization. You just need to make sure by the time you call glDraw* that everything is initialized and bound.

  • @Amine-gz7gq
    @Amine-gz7gq 4 дня назад

    You don't need to send the texture unit ID if you're using a single texture.

    • @OGLDEV
      @OGLDEV 4 дня назад

      You mean the sampler ID that goes to the shader? I'm assuming that in a real world app you will be switching multiple textures so I show all the steps even if something is done by default.

  • @codewithquinny102
    @codewithquinny102 4 дня назад

    Could you please help me understand pi 5 Vulkan compatibility and how to create h264 codecs into it for hwaccels in ffmpeg? Or without idk

    • @OGLDEV
      @OGLDEV День назад

      Sorry, I'm not familiar with h264 in Vulkan.

  • @Key_C0de
    @Key_C0de 4 дня назад

    Thanks for your tutorials! The order of transformation and what they should be is quite confusing though. I took some notes: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // the transformation of coordinate spaces for a skeletal mesh should happen in this order (left-to-right - D3D): nodeTransformationMatrix = scaling * rotation * translation; // scaling, rotation, translation take from this Node's aiNodeAnim structure for a specific animationTick; interpolation between the 2 keyframes between the input animationTick should also happen here (omitted for readability) finalNodeTransformationMatrix = rootNodeTransformationMatrix * ... * parentNodeTransformationMatrix * nodeTransformationMatrix; // the Node the specified Bone belongs to globalInverseTransform = inverse(rootNode->mTransformationMatrix); // a single matrix per Model (for all Nodes in said Model) finalBoneMatrix = boneOffsetMatrix * finalNodeTransformationMatrix * globalInverseTransform; // passed to vertex Shader finalVertexLocalSpace = vertexLocalSpace * finalBoneMatrix; // computed in vertex shader for a specific animation key // continue with transforming finalVertexLocalSpace with the WVP matrix etc.. Note: * If this is a Skeletal Mesh, then mTransformationMatrix isn't used at all (except for the root's) and instead the aiNodeAnim's combined transformation is used instead. * If this isn't a Skeletal Mesh, then nodeTransformationMatrix = mTransformationMatrix. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Is this right (in pseudocode), or nah? Could you give me a verification please? (pay attention to the order, I'm using left-right d3d so opposite to your OpenGL one). Thanks all the same! :)

    • @OGLDEV
      @OGLDEV День назад

      Looks correct.

    • @Key_C0de
      @Key_C0de День назад

      @@OGLDEV Thanks, your tut cleared up lots of things. Probably the clearest and most complete programming tutorial of skel animation I've seen online. Cheers!

    • @OGLDEV
      @OGLDEV День назад

      Thanks!

  • @TinyLittleEnormous
    @TinyLittleEnormous 5 дней назад

    Does it work differently in vulkan ? I guess I will have to want until the series finishes, because it is an advanced topic.

    • @OGLDEV
      @OGLDEV 4 дня назад

      It's actually not that advanced. I'm using the "3D Graphics Rendering Cookbook" as a guide for this series and this topic comes after textures and a few renderer restructuring.

  • @DebuggingwithKTiPs
    @DebuggingwithKTiPs 5 дней назад

    I started my channel 5 days ago 😅. Wish me good luck pls ❤

    • @OGLDEV
      @OGLDEV Час назад

      Good luck! You've got a new sub!

    • @DebuggingwithKTiPs
      @DebuggingwithKTiPs 16 минут назад

      @@OGLDEV thanks so much. I think my channel is doing well 🥳

  • @KarimHamdallah-gc2el
    @KarimHamdallah-gc2el 5 дней назад

    What is best choice for frame rendering On render each frame: Begin command buffer Begin pass Bind set 0 camera uniform buffer For each sub mesh of each mesh bind it's material set 1 And vertex buffer and render base vertex for each submesh Send pass This pass render to color attachment And then do begin single screen quad pass for post processing and end pass Then one submit of all these Or each pass has its own command buffers and successive submits Successive submits get me errors with semaphores even with using frames in flight

  • @typewriteraudio
    @typewriteraudio 5 дней назад

    Great video! Just subscribed!

    • @OGLDEV
      @OGLDEV 5 дней назад

      Thanks! Welcome aboard!

  • @SnakeEngine
    @SnakeEngine 6 дней назад

    How many sprites were you able to render like that at 60fps or so? Would be interesting to know, plus your pc specs.

    • @OGLDEV
      @OGLDEV 5 дней назад

      I haven't tested the perf limits of that implementation. If you plan to render lots of sprites simply make sure that you have a large enough vertex buffer so that you can render all of them in one draw call and then you'll be fine. My PC specs: Core-i9, GTX1650, 16GB ram.

  • @TheMrMeteor
    @TheMrMeteor 6 дней назад

    Looks like the debug messages or the validation don't work in Vulkan 1.3.296. They may have changed some things, as I don't have any output for the Debug even when I make sure to have errors it should catch, such as not destroying things before terminating. Any idea what to do to get a debug logger like this in newer versions?

    • @OGLDEV
      @OGLDEV 4 дня назад

      I don't know about 1.3.296. I'm using 1.3.290 and they work fine. Maybe try to downgrade. Is there a previous verison where you know they were working?

    • @TheMrMeteor
      @TheMrMeteor День назад

      @@OGLDEV Turned out to be user error, or the debugger wouldn't report the instance not being destroyed. And it wouldn't report anything missing unless something first has been made, such as a physical device not being destroyed correctly.

    • @OGLDEV
      @OGLDEV День назад

      Great!

  • @LucasDevelop
    @LucasDevelop 6 дней назад

    I love these videos! Especially when you show with visual using boxes and arrows how things are dependent on each other. Vulkan feels like a mess (for me) just starting out. And a lot of times I wonder why do some things even exist. But this playlist really clear things up ♥

    • @OGLDEV
      @OGLDEV 6 дней назад

      Thanks!

  • @OGLDEV
    @OGLDEV 7 дней назад

    Clone the sources: git clone --recurse-submodules github.com/emeiri/ogldev.git If you want to get the same version that was used in the video you can checkout the tag 'VULKAN_17'. Build on Windows: Open the Visual Studio solution: ogldev\Windows\ogldev_vs_2022\ogldev_vs_2022.sln Build the project 'Vulkan\Tutorials\Tutorial17' Build on Linux: cd Vulkan/Tutorials/Tutorial17 ./build.sh

  • @muhammetemirbulut6511
    @muhammetemirbulut6511 8 дней назад

    thks for help

    • @OGLDEV
      @OGLDEV 8 дней назад

      Always welcome :-)

  • @Amine-gz7gq
    @Amine-gz7gq 8 дней назад

    Very nice video ! Greetings from Tunisia.

    • @OGLDEV
      @OGLDEV 8 дней назад

      Thank you so much!

  • @eternalnerd_
    @eternalnerd_ 10 дней назад

    OGLDev you have the best graphics programming videos. I love the humor XD

    • @OGLDEV
      @OGLDEV 10 дней назад

      Glad you enjoy it! 😁

  • @nftgamestricks4959
    @nftgamestricks4959 11 дней назад

    Nice video! I have a question, in the 2nd method, the notation of dot_product(p_view, row1 - row4) for example, shouldn't be like this: dot_product(p_world, row1 - row4), because we are using the point in World Space? That is, otherwise, we should have multiplied by ViewMatrix in p4D (and that's not correct, obviously). If I'm wrong, please correct me, maybe there's something I'm misunderstanding. Thanks!

    • @OGLDEV
      @OGLDEV 9 дней назад

      The original condition was -Wc<=Xc<=Wc. To calculate Xc we apply the projection matrix on the view space vector. Otherwise moving the camera will have no effect. So we have to use p_view and not p_world on all the calculations. This is just to show the transformations that the position has to go through. To avoid transforming p4d to view space (as we do in the first method) we calculate the clip planes based on the view-projection matrix. This is why it is more optimized.

    • @nftgamestricks4959
      @nftgamestricks4959 6 дней назад

      ​@@OGLDEV Thank you for the quick answer! Sorry again, so: The idea is not avoiding multiplying vertex by a matrix each frame? In fact, in 10:10 (method 1) you do that, and 18:20 (method 2) you don't do that. Method 1: p4D = VP * vec4(p, 1.0) Method 2: p4D = vec4(p, 1.0) Method 1: Inside = p4D.x <= p4D.w && p4D.x >= -p4D.w && ... Method 2: Inside = dot(leftClipPlane, p4D) >= 0 && dot(rightClipPlane, p4D) <=0 && ... So p4D (in method 2) is in World Space (you didn't multiply it by any Matrix). That's why I mean that must be 'p_world' and not 'p_view', because you never multiplied 'p' by any matrix before. (assuming 'p' in World Space, and not in Local Space obviously). Also, your Update of Frustum Planes take ViewProjectionMatrix as parameter: void Update(const Matrix4f& ViewProj) { ViewProj.CalcClipPlanes(m_leftClipPlane, ...); } Anyway, I understand that the proof in method 2 is correct, and the dot_product(p_view, row1 - row4) is fine, because row1 and row4 come from a ProjMatrix transformation (and not ViewProjMatrix). But the question is in contrast to the code. Thanks again!

    • @OGLDEV
      @OGLDEV 4 дня назад

      Yes, the idea is to optimize away the matrix multiplication. But if what bothers you is the slide in 21:43 then at this point we are looking at the naive method of going from view to clip space. And then we incorporate that knowledge into the calculation of the clip planes so we don't need to do the matrix multiplication. So the slide doesn't indicate what the code is doing, just the rational of how we get there.

  • @adamrushford
    @adamrushford 12 дней назад

    super simple now just include vcpkg with manifest mode and a vcpkg.config and it'll download whatever you want automatically any os

    • @OGLDEV
      @OGLDEV 12 дней назад

      I'll check it out. Thanks for the tip.

    • @adamrushford
      @adamrushford 11 дней назад

      @@OGLDEV in AlmondEngine it's setup with msvc and also completely seperately with CMake, so it could be working within minutes.. microsoft has a tutorial on how to set it up, and in CMake just include the "include and share" directories, the triplet is automatic to the OS and system eg x64... on linux I had to install libs in classic mode before cmake could copy them over, but you can uninstall once they do.. it creates a vcpkg in your project directory and when you remove items and build it'll uninstall them also. it builds and copies the dll, libs, at runtime into the bin folder also, It's the only way to code now.

    • @adamrushford
      @adamrushford 11 дней назад

      @@OGLDEV Search vcpkg manifest mode tutorial

    • @adamrushford
      @adamrushford 11 дней назад

      @@OGLDEV there are other package managers as well eg Conan

    • @adamrushford
      @adamrushford 11 дней назад

      @@OGLDEV ruclips.net/video/0h1lC3QHLHU/видео.html

  • @AleksaVučković-x4s
    @AleksaVučković-x4s 12 дней назад

    Great video! Thank you 🙏

    • @OGLDEV
      @OGLDEV 12 дней назад

      You're welcome!

  • @saav2774
    @saav2774 13 дней назад

    I was searching for VULKAN from warhammer 40K 😂

    • @OGLDEV
      @OGLDEV 13 дней назад

      Now you found it!

  • @Amine-gz7gq
    @Amine-gz7gq 14 дней назад

    I think it's a good thing to use glBindBuffer(GL_ARRAY_BUFFER, 0) after using a VBO

    • @OGLDEV
      @OGLDEV 13 дней назад

      True, same for VAO.

  • @hauuagdbhshg3604
    @hauuagdbhshg3604 14 дней назад

    I've been stuck on a problem for a while - shadows rotate together with objects, i understand that it's a math error, but i can't find it. Anyone has any idea where to look at? Btw, great video, thanks for your detailed explanations! The course is really useful for learning graphics programming in general, not just opengl.

    • @OGLDEV
      @OGLDEV 13 дней назад

      You're welcome! Do you mean that when the camera is moving and the light doesn't the shadows move instead of being stationary?

    • @hauuagdbhshg3604
      @hauuagdbhshg3604 12 дней назад

      @OGLDEV thanks for the reply!) No, when the light is stationary, and the camera rotates, everything works fine, but when the object itself is rotated, the lit area on it, and the shadow rotate too, as if the light source has moved (which it didn't)

    • @OGLDEV
      @OGLDEV 12 дней назад

      But if the object is rotated shouldn't it have an effect on the shadow? Unless the object is a sphere or something like that. If the light doesn't move the shadow WVP matrix and the shadow map should look the same. You can easily print the matrix and verify. The shadow map can be viewed in RenderDoc.

    • @hauuagdbhshg3604
      @hauuagdbhshg3604 12 дней назад

      @OGLDEV I mean, it rotates like it's stuck to the object, as if it was just a texture. Logging data is a problem cause I'm using webgpu, it's not that straightforward, which is part of the problem)

    • @OGLDEV
      @OGLDEV 12 дней назад

      Probably a bug in the construction of the shadow matrix. I'm not familiar with webgpu but this page provides some details on debugging with RenderDoc: eliemichel.github.io/LearnWebGPU/appendices/debugging.html

  • @ArtemShoobovych
    @ArtemShoobovych 14 дней назад

    i am still struggling with quaternions, but it actually fixed my issues with the camera - i previously used to just rotate cameraRight and cameraForward vectors around cameraUp or cameraRight, but somehow this time it was just wobbling camera in an oval (like if the forward vector was rotated using cosine function)

    • @OGLDEV
      @OGLDEV 13 дней назад

      Quaternions are difficult to intuitively understand but afaik they are the best solution to all those camera rotation problems.

  • @bachircherafeddinebenhacin4125
    @bachircherafeddinebenhacin4125 14 дней назад

    best opengl course seen so far

    • @OGLDEV
      @OGLDEV 14 дней назад

      Thanks!

  • @CodeParticles
    @CodeParticles 17 дней назад

    Another fun upload! Something neat of a rough benchmark test I found out that the 8k toned jpg file @ 6mg loaded about 2 seconds in equirectangular projection. I then took the same jpg file and cubemapped it into 6 separate files which blew up from 58mb to 73mb each to match the resolution and took 6 and a half seconds to load in cubemapping layout!

    • @OGLDEV
      @OGLDEV 17 дней назад

      Thanks! So are you saying that it is actually better to run the algorithm in real time instead of using it as an offline tool to create a cubemap texture?

    • @CodeParticles
      @CodeParticles 15 дней назад

      @@OGLDEV In the case of the 8k file yes! However, if the jpg file is 4k and lower the outcome may be different. Which I should've tested in advance I apologize.

    • @OGLDEV
      @OGLDEV 15 дней назад

      Interesting, thanks.

    • @CodeParticles
      @CodeParticles 14 дней назад

      @@OGLDEV another odd thing is I feel like the single jpg algorithm 'looks' better when looking up and down as opposed to the 6 file cubemap. However it could be all in my head.

    • @OGLDEV
      @OGLDEV 14 дней назад

      Probably just a false impression. Since we are going through a cubemap texture anyway.

  • @ortassa1096
    @ortassa1096 18 дней назад

    may i ask where u from your accent sound really familiar

    • @OGLDEV
      @OGLDEV 18 дней назад

      קרית חיים

    • @ortassa1096
      @ortassa1096 12 дней назад

      @@OGLDEV טוב לדעת שיש לנו אנשים כמוך במדינה. תודה רבה אחי על התוכן הנהדר 🙏

    • @OGLDEV
      @OGLDEV 12 дней назад

      בכיף!

  • @oreostastegoods
    @oreostastegoods 19 дней назад

    OpenGL cubemap coordinate space is horrid -- thanks for spending the time to break it down

    • @OGLDEV
      @OGLDEV 19 дней назад

      You're welcome 😊

  • @dantheplanner
    @dantheplanner 19 дней назад

    Merry Christmas dude. 🎅🏾

    • @OGLDEV
      @OGLDEV 19 дней назад

      Merry Christmas! 🎄

    • @dantheplanner
      @dantheplanner 13 дней назад

      @@OGLDEV I wish you a great year. 🍀🥳

  • @othmanemana5185
    @othmanemana5185 20 дней назад

    Is OpenGL still worth learning in 2025?

    • @OGLDEV
      @OGLDEV 20 дней назад

      Assuming that you are interested in learning a graphics API (because strictly for game development a game engine may be a better choice) then OpenGL is a good balance between low level and "developer friendly". Vulkan and D3D12 are very low level and move a lot of the driver work over to you. Theoretically it should provide performance improvement but you need to know what you're doing and how to optimize. OpenGL allows you to build almost any kind of renderer but the driver still takes care of a lot of stuff for you.

    • @adrirt5200
      @adrirt5200 18 дней назад

      It must be incredibly hard and frustrating learning vulkan (or D3D12, Metal) if you don't have a previous knowledge of any Graphics API first. I think it's more human-friendly to learn OpenGL ES 1.1 to learn the basics, then OpenGL ES 3.0 and finally (and if your app/game has a cpu bottleneck) Vulkan. As far as I know OpenGL ES 3.0 has some advantages than OpenGL, it runs on Android and with ANGLE as a Renderer, it translates OGL calls to Vulkan, D3D and Metal

    • @OGLDEV
      @OGLDEV 18 дней назад

      I recommend studying OpenGL before Vulkan. I'm not experienced with ES but I guess it should serve the same function of providing a 3D foundation as well as 3D math which will be useful for Vulkan as well.

  • @robrick9361
    @robrick9361 21 день назад

    Thanks for the video, very helpful. But you should really consider switching to the synchronization2 API since that's what most people who are learning Vulkan in 2024 will be using. Also TOP_OF_PIPE_BIT and BOTTOM_OF_PIPE_BIT are both deprecated. You can just use ALL_COMMANDS_BIT or NONE_BIT.

    • @OGLDEV
      @OGLDEV 20 дней назад

      You're welcome! I'll probably do that later in the series. I'm following a book which came out prior to the new api but I'll find a spot for it.

  • @barspozlu6220
    @barspozlu6220 22 дня назад

    I came up with this while trying to implement it myself, It works pretty well! I think this may be more efficent than what is shown in the video. void PerspectiveCamera::AddPitchInput(float offset) { m_Orientation = glm::normalize(glm::angleAxis(glm::radians(-offset), GetRight()) * m_Orientation); UpdateViewProjection(); } void PerspectiveCamera::AddYawInput(float offset) { m_Orientation = glm::normalize(glm::angleAxis(glm::radians(-offset), glm::vec3(0, 1, 0)) * m_Orientation); UpdateViewProjection(); } glm::vec3 PerspectiveCamera::GetRight() { return glm::normalize(m_Orientation * glm::vec3(1, 0, 0)); }

    • @OGLDEV
      @OGLDEV 3 дня назад

      Thanks for the feedback. Why is this more efficient? You have separate functions for pitch and yaw so you call angleAxis twice.

    • @barspozlu6220
      @barspozlu6220 3 дня назад

      @@OGLDEV The implementation in the video creates 2 quats as well one with the constructor that takes in a vector and one with the lookat function, I might be wrong but I thought my way could be more efficent because of the way I use quats to get the right vector and simply rotate around that.

    • @OGLDEV
      @OGLDEV 3 дня назад

      The quaternion in the constructor is called only once so it doesn't really matter. I'm making the comparison with my CalcCameraOrientation() which creates a single quaternion from the change on both X and Y and multiplies it by the orientation matrix.

    • @barspozlu6220
      @barspozlu6220 3 дня назад

      @@OGLDEV calcameraorientation by itself does not really work though, It calls SetUpVector which creates another quat.

    • @OGLDEV
      @OGLDEV 3 дня назад

      True. This is to reset the orientation of the camera so that it doesn't tilt from side to side (supporting only yaw and pitch, avoiding rolling). Did you have this problem? How did you solve it?

  • @aprile1710
    @aprile1710 24 дня назад

    Something I would like to do is playback a video using hardware decoding. If you could do a video on using FFMPEG to decode video frames into textures on the GPU using OpenGL that would be amazing.

    • @theevilcottonball
      @theevilcottonball 13 дней назад

      Reminds me that I wanted to try pl_mpeg

    • @OGLDEV
      @OGLDEV 3 дня назад

      I've added this to the todo list. I have to admit that I'm not familiar with this so will require some research to implement.

    • @aprile1710
      @aprile1710 3 дня назад

      @@OGLDEV I understand. Unfortunately ffmpeg examples are pretty rare and most of them do not decode to video memory but rather to system memory and then copy back to the GPU which is very inefficient but simpler I guess. Thanks for looking into it.

  • @andrewdiggs7039
    @andrewdiggs7039 24 дня назад

    Thanks!

    • @OGLDEV
      @OGLDEV 24 дня назад

      Glad it was helpful! Thank you for your continued support 😊

    • @OGLDEV
      @OGLDEV 20 дней назад

      To get 10 months of early access (per the "Officer in the 3D underground" tier on Patreon) just send me your email.

  • @brunomarques5258
    @brunomarques5258 25 дней назад

    I personally prefer start with d3d11. Now I'm a big fan of Vulkan and D3D12.

    • @OGLDEV
      @OGLDEV 24 дня назад

      I would love to make a D3D11 series. Unfortunately I don't have the time for it...

  • @coreC..
    @coreC.. 26 дней назад

    @11:51 Maybe it's this? R = sqrt(x^2+y^2+z^2). But the documentation takes the arctan from something other than R. It uses only sqrt(x^2+y^2).

    • @OGLDEV
      @OGLDEV 26 дней назад

      Perhaps the usage of 'R' is a bad naming choice because it confuses with the Greek rho. The docs indeed do the square root without Z.

    • @coreC..
      @coreC.. 25 дней назад

      @@OGLDEV You're just picking the wrong lengths/ratios of the right-sided triangle when calculating the tangent of the angle. Tangent = opposite side / adjacent side. But you did hypotenuse / adjacent.. *And we all thought that the part @**9:42** was the confusing part.* 🙂 fun.. It really _is_ confusing with all the axis swapping and/or negating. It all looks the same, and it makes you simple. I had to do it too in a project, and i used a matrix to convert the values (looks cleaner?). But it didn't work the first time 😄 because of confusion(s) => mistakes.

    • @OGLDEV
      @OGLDEV 22 дня назад

      sqrt(x^2+y^2) is the length of the projection of line on the XY plane. What I did is Z/sqrt(x^2+y^2) which is the arctan of (90-theta) instead of theta as it appears in the diagram. But I guess it makes sense because we get theta=0 on the XY plane (when Z is zero) and then v=0.5. When z=1 and sqrt(x^2+y^2)=0 we get theta=PI/2 and then v=0. When z=-1 and sqrt(x^2+y^2)=0 we get theta=-PI/2 and then v=1. So I was confused by then wikipedia diagram /equations which demonstrates the formal picture but for the cubemap case we should actually draw theta "below" the line rather than above it.

    • @coreC..
      @coreC.. 20 дней назад

      @@OGLDEV You debugged it afterall. ;-) In any case, this video is of good help for me. I am writing a little program to make a flat Earth. A friend wants to decorate a wall with a map of our planet, but without any distortion of distances (so, not using any of the usual map projections). Now i don't have to think so much anymore about how to tackle that problem in the calculations. 👍

    • @OGLDEV
      @OGLDEV 20 дней назад

      Yes, your comment gave me the motivation. Good luck with the project!

  • @mathssoso4261
    @mathssoso4261 26 дней назад

    Thanks for you content, I am not sure if you mentioned a very important step, 5:11, that WorldPos is an interpolation of the input WorldPos, the vertex shader output, it is mentioned in Tutorial #9, I think it's important to mention it here too.

    • @OGLDEV
      @OGLDEV 24 дня назад

      You're welcome! Thanks for the feedback, hopefully at this stage people know that every input attribute in the fragment shader is the result of an interpolation of a vertex shader output variable.

  • @aswinaswin5672
    @aswinaswin5672 27 дней назад

    i hope that u remember me......Its been a long while. I have learned a lot of openGL concepts in these months. Your tutorial helped me a lot. I now making my own 2d engine which is capable of producing output like commercial engine. I have learned a lot from a lot of RUclips channels. Your tutorial's are always detailed and explained with pictures which are easier to understand. Your work is well deserved. THANK YOU

    • @OGLDEV
      @OGLDEV 26 дней назад

      Glad that the tutorials were helpful 😀

  • @FREAKBAlT
    @FREAKBAlT 27 дней назад

    I have that book, it’s pretty cool but from what I know it’s pretty much just the vulkan spec, but in my case reading on paper is easier so I love the book.

    • @OGLDEV
      @OGLDEV 27 дней назад

      I think it is a much nicer read than the spec. The spec is just like any other spec - contains all the details and makes it difficult to see the big picture. The book is more condensed and makes it easier to study a specific topic. I try to read the relevant chapter before every tutorial.

  • @OGLDEV
    @OGLDEV 29 дней назад

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OGLDEV/ . You’ll also get 20% off an annual premium subscription. ****************************************************************************************** Clone the sources: git clone --recurse-submodules github.com/emeiri/ogldev.git If you want to get the same version that was used in the video you can checkout the tag 'TUT_56_CUBEMAPS'. Build on Windows: Open the Visual Studio solution: ogldev\Windows\ogldev_vs_2022\ogldev_vs_2022.sln Build the project 'OpenGL\Tutorials\Tutorial56_Cubemaps'

    • @CodeParticles
      @CodeParticles 23 дня назад

      Another great upload. But with all due respect, the title to this video tutorial should be Equirectangular Cubemapping!

    • @OGLDEV
      @OGLDEV 22 дня назад

      Thanks! I think the original title will bring in more views... RUclips now allows you to experiment with multiple thumbnails and see which works best but you are still limited to a single title at a time. Maybe in the future I'll try a different title and see if it works better :-)

  • @bogdan_mocanu
    @bogdan_mocanu 29 дней назад

    Hi, any tips on how to separate the land and water mesh of the heightmap? I would like to render them completely differently and I am not sure how to split the verts properly between the two.

    • @OGLDEV
      @OGLDEV 29 дней назад

      Usually the heightmap doesn't include water. You decide the height of the water and then build a separate mesh for the water on top of the "ground".

    • @bogdan_mocanu
      @bogdan_mocanu 29 дней назад

      Thanks! I was thinking of taking the same approach.​@@OGLDEV

    • @OGLDEV
      @OGLDEV 29 дней назад

      Great! You can see my water demo which is based on the tutorial by @ThinMatrix here: ruclips.net/user/shortsglBziimIN14?feature=share. See the vid description for the source. The water mesh in this case is just a rectangle but there are more advanced approaches.

  • @generalpirateguy
    @generalpirateguy Месяц назад

    we are getting errors on games with this one!

    • @OGLDEV
      @OGLDEV Месяц назад

      What errors exactly?

  • @nomannian
    @nomannian Месяц назад

    I love the tutorial and your voice. But how can I render shadows for multiple point lights in the scene? do I need to create multiple depth attachments or there is another efficient technique? I would be very glad if you create a video on it

    • @OGLDEV
      @OGLDEV 29 дней назад

      Thanks! There are many approaches to handling shadows from multiple light sources. The basic method is indeed to create several textures and render into them. You can use the geometry shader to render into multiple textures instead of doing a multi-pass on the application level. You can use a texture array for holding multiple textures. I haven't done much optimization on this topic so I guess you'll need to do more research. The following contains interesting info on multiple shadows in Doom: www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/#shadow-map-atlas. I hope to cover this topic at some point...

    • @nomannian
      @nomannian 28 дней назад

      @@OGLDEV thank you so much

  • @InsocialDev
    @InsocialDev Месяц назад

    Appreciate the hardwork. I was getting questions to why we need to add GLAD and GLFW and you solved it.Thank's man and you earned a sub

    • @OGLDEV
      @OGLDEV Месяц назад

      Thanks!