Тёмный

OpenGL Tutorial 18 - Framebuffer & Post-processing 

Victor Gordan
Подписаться 13 тыс.
Просмотров 26 тыс.
50% 1

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 53   
@starklosch
@starklosch 3 года назад
I'm still on the first videos but I wanted to say thank you. There's almost nothing about OpenGL in my language, it's difficult to learn in another one but you speak clearly and slowly so I can understand you. Keep it up!
@VictorGordan
@VictorGordan 3 года назад
Thank you :) There are also English subtitles made by me, so just activate CC if you think they'd help.
@kurciqs8355
@kurciqs8355 2 года назад
this is really handy. anytime i need to revise or learn something related to opengl, victors video pops up
@fudgeracoon2529
@fudgeracoon2529 3 года назад
Short, simple and informative. I love it!
@VictorGordan
@VictorGordan 3 года назад
Glad you liked it :)
@bpm.coding
@bpm.coding 3 года назад
I love your tutorials man! They have really helped me with my projects and they have taught me a lot. Keep it up :)
@VictorGordan
@VictorGordan 3 года назад
Thank you and good luck with your projects :)
@smokinglife8980
@smokinglife8980 9 месяцев назад
Yes this is great frame buffers are also used to render your scene to a imgui window!
@sebp400
@sebp400 Год назад
damn, the way you explained kernels made me understand more clearly. I've been working on object outlining techniques in the past week and I'm trying different techniques.
@diahaidificbs
@diahaidificbs 2 года назад
Hey Victor when I load the normal map with post processing FBO on, it just draws the normal texture on screen instead of applying it to the model, when I disable the post FBO it works just fine. The code is identical to yours. Do you know why is that happening?
@VictorGordan
@VictorGordan 2 года назад
Sounds like you're messing up your texture units somehow
@paradigmshift03
@paradigmshift03 2 года назад
Hey Victor, thanks so much for this informative video. I was wondering if rendering to a framebuffer maintains anti-aliasing? If not, is there a more straightforward way to enable anti-aliasing than having to render to a multi-sampled texture?
@VictorGordan
@VictorGordan 2 года назад
It really depends on what kind of anti-aliasing you want to do. I have a tutorial on AA you can watch in which I think I show MSAA if I remember correctly. Rendering to a framebuffer does not maintain AA afaik. But it opens the possibility for post-processing cheap AA such as FXAA (NVIDIA published a paper on it, u can take a look at that). I hope that sort of answers your question! :)
@paradigmshift03
@paradigmshift03 2 года назад
@@VictorGordan It does indeed! Thank you :)
@Felicia-wc4iz
@Felicia-wc4iz Год назад
Hi, hope you still have time to answer questions! I was just wondering when we create our quadVAO and quadFBOs we are doing EnableVertexAttribArray(0) and EnableVertexAttribArray(1), which means that in the vertex buffer for our framebuffer shaders the position of the first triangle is stored in position 0 and then the position of the second triangle is stored in position 1 of the vertex buffer (is that a correct interpretation?) I was just a bit confused since in the frambuffer.vert we then pick the positions from layout location 0 and then the texture coordinates from layout location 1, isn't that the positioning of the two different triangles covering the screen and not the texture coordinate? I am having some trouble with my code so trying to debug it and I thought this could have to do with it! :)
@VictorGordan
@VictorGordan Год назад
I suggest rewatching tutorial 2 "triangle" since you seem to misunderstand how VAOs and VBOs work ;) Basically position 0 and 1 in this cade refer to the position of an attribute of a vertex within itself. A vertex can have multiple attributes such as a position, a texture coordinate, a color, etc. Position 0 refers to the position of the vertex in this case, and position 1 to the texture coordinate (if I remember correctly) Hope that helps :d
@PhamAnhKhoa118
@PhamAnhKhoa118 3 года назад
What an interesting lesson !!!
@VictorGordan
@VictorGordan 3 года назад
Thank you :)
@phule5966
@phule5966 10 месяцев назад
my object's texture is being rendered to the screen as an image instead of the scene, any tips?
@mackerel987
@mackerel987 2 года назад
Hello Victor! Hope you are well. I want to render my framebuffer onto an imgui window but I can't get it to work. I'm trying to pass texture reference to the ImTexId but I get a black image... What could be wrong? Also are you planning on an imgui tutorial in future?
@VictorGordan
@VictorGordan 2 года назад
I do have a tutorial on the basics ot ImGUI! ;) I never tried displaying a framebuffer in an ImGUI window so not sure what is going wrong :/ good luck tho!
@mackerel987
@mackerel987 2 года назад
@@VictorGordan Got it. Thank you!
@ziggycross
@ziggycross Год назад
I'm jumping into this series on this video as I was hoping to add post-processing effects to my game. Butafter going through it, I'm having an issue with the GL_DEPTH_TEST. For some reason, reactivating it in my render loop does not work properly. Once I deactivate, it does not reactivate. Anyone got any suggestions on what this might be? Either way, this seems like a great tutorial series, and I'm looking forward to diving in further!
@VictorGordan
@VictorGordan Год назад
Are you sure you reactivate it at the correct point in the loop?
@keithle_
@keithle_ Год назад
Hi, love your tutorial I saw that you had VAO.h and VBO.h, is it possible to call functions from them and create more like RBO.h and FBO.h?
@VictorGordan
@VictorGordan Год назад
I mean, it's possible to do anything that C++ allows you to do with classes. It's down to C++, not OpenGL
@jedder2572
@jedder2572 3 года назад
Once again cool video. I guess a shadow mapping video is coming soon, correct?
@VictorGordan
@VictorGordan 3 года назад
Thanks :) As for the shadow maps, it depends on your definition of soon haha I will probably do shadow maps in a month or so...not sure 🤔
@jedder2572
@jedder2572 3 года назад
@@VictorGordan Hahaha, Ok. Then it seems like i have to find my errors my self. Have a nice day!
@VictorGordan
@VictorGordan 3 года назад
Good luck ;)
@LynJuice
@LynJuice 3 года назад
hello love your tutorials could you show us how to move the model?
@VictorGordan
@VictorGordan 3 года назад
Thank you :) Just multiply it by a translation matrix in the vertex shader :p
@LynJuice
@LynJuice 3 года назад
@@VictorGordan took me a while to do so but it works THANK YOU
@LynJuice
@LynJuice 3 года назад
@@VictorGordan another question could you please make a video about collision detection?
@VictorGordan
@VictorGordan 3 года назад
That's a whole 'nother thing from OpenGL. I might do a video on that when I'm done with OpenGL...so in a few months probably
@hamedkabirclashroyale5752
@hamedkabirclashroyale5752 3 года назад
it would be nice of you if you could make a video of Point Shadows too. Thank you very much
@VictorGordan
@VictorGordan 3 года назад
Yup, I will in about a month or so! ;)
@bpelectric
@bpelectric Год назад
Really wish you had this same tutorial using DSA. I'm trying to write a DSA openGL application right now and it's like pulling teeth - every tutorial, even ones made in the last year or two are using pre-DSA patterns. DSA patterns are so much closer to how all the other mainstream graphics APIs work, I'd much rather be using DSA :/
@VictorGordan
@VictorGordan Год назад
I have a tutorial on DSA ;) Check out this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cadzqhqPqVA.html
@PatrickFrom
@PatrickFrom 6 месяцев назад
-When resizing the window, should I recreate the framebuffer?- -Since I've noticed that if I change the window size, it looks weird.- For anyone else who doesn't want a static size, you can do for example GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgb, ClientSize.X, ClientSize.Y, 0, PixelFormat.Rgb, PixelType.UnsignedByte, IntPtr.Zero); GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, _postprocessRenderbuffer); GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, RenderbufferStorage.Depth24Stencil8, ClientSize.X, ClientSize.Y); If you encounter Framebuffer Incomplete when in fullscreen and alt + tabbing, skip rendering all together since that could mean that the screen size is 0.
@qiveal9293
@qiveal9293 2 года назад
Not sure if you still reply on this, I'm having an issue where one of the base color images from a model is shown as a image on the screen and I can still apply the effects to it so it's working, but why is it showing a flat image now? I have also copied and paste most of the code.
@VictorGordan
@VictorGordan 2 года назад
I still reply haha Not sure I understand your question. What you were seeing before was also a flat image... it's just that now we make a framebuffer ourselves and slap it on a rectangle that covers the whole screen (make sure to not apply matrices to it tho, unlike all the other geometry in your scene). I hope that answers your question...
@qiveal9293
@qiveal9293 2 года назад
@@VictorGordan Ok sorry for being unclear. I started to comment it out to see what is happening. So when I bind the framebuffer it goes from 3D to a black screen, and when I do glDrawArrays it goes from the black screen to the baseColor of a model in my scene.
@VictorGordan
@VictorGordan 2 года назад
Oh ok, that seems really strange. I actually have no idea what the problem might be in this case :(
@qiveal9293
@qiveal9293 2 года назад
@@VictorGordan Hmm, okay. Thanks for your quick responses, I'll just have to do some more debugging.
@mackerel987
@mackerel987 2 года назад
@@qiveal9293 hello, I'm having the same problem. Did you find out a fix?
Далее
OpenGL Tutorial 19 - Cubemaps & Skyboxes
6:09
Просмотров 32 тыс.
РЫБКА С ПИВОМ
00:39
Просмотров 1,1 млн
Basic Shadow Mapping // OpenGL Tutorial #35
16:54
Просмотров 22 тыс.
How to Crack Software (Reverse Engineering)
16:16
Просмотров 619 тыс.
Color Quantization and Dithering
11:55
Просмотров 434 тыс.
Deferred Lights - Pixel Renderer Devlog #1
8:41
Просмотров 396 тыс.
I Made a Graphics Engine
6:42
Просмотров 257 тыс.
Clipping And Viewport Mapping  // OpenGL Tutorial #29
11:02
OpenGL - Framebuffer Objects
14:37
Просмотров 20 тыс.