Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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