What would be the best way to approach implementing Custom Buffer / Scene Texture?

Hello!

I’m wanting to create a custom 24/32-bit GBuffer pass or scene texture, allowing me to render to an RGB/RGBA texture from materials, and use it in solely in post process.

I found a similar question here, but no answer was given:

What would be the best way to approach this?

Thanks!

Edit: I’ve found the custom depth pass in FSceneRenderer::RenderCustomDepthPass() and it looks like I could do something very similar, with a few different flags and replacing FCustomDepthPrimSet::DrawPrims() with a function appropriate to what I would like to achieve? Would this be a good approach?

One thing I may want to do is to render objects that may potentially be obscured by other geometry; would primitives / geometry already be culled in this step, or is this still viable?

I’m going to bump this, since it’s been unanswered for a month.

Six week bump.

Hi there,

it’s a little late, but maybe you already stumbled over that here:

I was already quite aware of the custom depth buffer - what I wanted to know was best practices for how to implement a new buffer, one that can be drawn to via the material system, then used in post processing. This problem was solved and the game I was working on at the time has since shipped (it’s been nearly 18 months since the question was asked after all), but I still wouldn’t mind getting some a decent answer on this one to be honest.

Cheers.

Hi,

I am looking for something similar and I have found your question, so while I don’t have an answer, I’ll add these links here for anyone following the same path.

AnswerHub - Rendering to custom GBuffer or rendertarget from material:

I’m currently trying to solve this problem myself, and I think I’m almost there… I have a chronicle on the forum for anyone interested or for anyone who would like to help me out :slight_smile:

Custom GBuffer in UE4:

And today I’ve gotten the custom GBuffer buffer working for a material!

AnswerHub - Is it possible to get more extended rendering options for VFX?:

This would be possible with a little bit of work. There are already view modes to visualize each part of the GBuffer in the editor viewport settings.

@ambershee: would you happen to have a write up on the solution you implemented by any chance?