r/GraphicsProgramming • • 24m 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!

2 Upvotes

4 comments sorted by

•

u/AutoModerator 24m ago

Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:

  • No showcases.
  • Disclose AI usage in post or project.
  • Present a topic to talk about, e.g. how something works.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/obp5599 11m ago

You need a gbuffer to do deferred rendering. Thats basically it. It depends on the needs and goals of your renderer/engine.

Unreal is deferred, not sure about unity since i don't work in it

1

u/LoneWolf6062 7m ago

A Gbuffer lets you implement screen space effects easier, although you could always approximate normals by reconstructing them from the depth buffer.

Unreal uses deferred rendering by default but does have forward rendering as a fallback and for VR.

1

u/sirpalee 5m ago

There are techinques that depend on a full or partial g-buffers. If you are not using any of them, then no, you don't need a g-buffer and it doesn't make sense to build one.

The issue with SSAO that it typically requires normal and depth information and should not multiply lighting contributions. If you are doing depth prepass, then that should be enough.