Search Unity

Control Rendering of GUI Elements

Discussion in 'Image Effects' started by SkavenPlanet, Mar 7, 2017.

  1. SkavenPlanet

    SkavenPlanet

    Joined:
    Jan 20, 2014
    Posts:
    33
    Hi, I have implemented custom deferred rendering where I use replacement shaders to render the scene into a custom gbuffer using MRTs by setting the camera's target buffers. This works very well except that all GUI is rendered into my albedo buffer (at least that's what I see when I preview it in the inspector, it doesn't seem to have an effect on the lighting though) which makes sense since it's set as the camera's first target buffer. I would like to know if there is a way to control the rendering of gui elements and make it happen during OnRenderImage on a specific render texture instead of when the rest of the scene is rendered. If not I could always use a separate camera for this but I would like to avoid this if possible. Thanks.
     
    Last edited: Mar 8, 2017