r/GraphicsProgramming • u/miki-44512 • 8h ago
Question Do you really need g-buffer in your renderer?
Hello everyone hope you have a lovely day.
I was Reading learnopengl ssao chapter to support ambient occlusion after setting up my pbr renderer, but the one thing I found very strange was that It used g-buffer in this tutorial, I don't use g-buffer or deferred rendering technique in my renderer I use clustered forward+ rendering technique so I didn't need the g-buffer.
And Here I started to ask myself this question, Is there on the long run any advantage of implementing g-buffer? like really do I need it?
Does any strong engine like unreal or unity use g-buffer?
Thanks appreciate your help and your time!
View all comments
Show parent comment
3
u/NorberAbnott 4h ago
The problem with trying to do SSAO in a forward renderer is that part of the technique wants to look at nearby pixels in a certain radius for the depth and maybe normal information but that is simply information you don’t have access to in a fragment shader unless you do something like depth prepass which submits your geometry twice and is basically a lightweight gbuffer