Information about UE4 GBuffer

I’m pretty desperatly searching for information about the GBuffer, but just can’t find any.

Things that interesst me:

  • How big is the GBuffer? How many bits does it uses per pixel?
  • How does the layout of the GBuffer look like?
  • Is it possible to make the GBuffer “slimmer” ?
  • What is r.GBuffer and r.GBufferFormat for?

I would very appreciate any kinds of info!

P.S.: Sorry if this isn’t the right place to question.

I found in the ConsoleManager.cpp some clues:

  • r.GBuffer: 0=Do not use GBuffer (fast minimal rendering path), 1=Use GBuffer [default]. (However it caused artifacts which rendered the game unplayable.)
  • r.SceneColorFormat: (Interessting options which affects some of the GBuffer I think) Defines the memory layout (RGBA) used for the scene color. Affects performance, mostly through bandwidth, quality especially with translucency.

You would like to check out FSceneRenderTargets class and EncodeGBuffer function in DeferredShadingCommon.usf. You would get a better understanding on GBuffer layout. As said, you could slim GBuffer size according to your specific requirement. You must find a balance among performance, vram size and quality.

Hello ,

Here is an in depth look at g-buffers and how they work. First paragraph discusses how to choose the size of the G-Buffer.

Thanks,