Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Graphics [SOLVED] Command Buffer Blit from Gbuffer stopped working

Discussion in '5.4 Beta' started by Deleted User, Apr 10, 2016.

  1. Deleted User

    Deleted User

    Guest

    Background
    Alloy, our shader framework, has two advanced deferred effects, SSS and transmission, that require reading from the G-Buffer and post-processing some of its data. To accomplish this, we've been using command buffers that read the appropriate render textures from the G-Buffer and copy them into other textures with commands like this:

    Code (CSharp):
    1. m_renderBlurredNormals.Blit(BuiltinRenderTextureType.GBuffer2, blurredNormalsBufferIdTemp, m_deferredBlurredNormalsMaterial, 0);
    Issues
    When porting our framework to Unity 5.4, the effects suddenly stopped working. Through the very handy Frame Debugger (thanks, btw) I've confirmed that the above blit call is binding "UnityWhite" to the "_MainTex" parameter of the blit shader, instead of the correct G-Buffer RT.

    Questions
    1. In 5.4, is there a new way to bind to the Gbuffer textures that I am not aware of?
    2. Is this just a bug that needs to be fixed on your end?
    Thanks for any help you can provide.

    EDIT: Never mind. They fixed it in Unity 5.4 b14. Thanks.
     
    Last edited by a moderator: Apr 12, 2016