Search Unity

Grapthics.Blit() with material not working correctly on Android

Discussion in 'Shaders' started by voropserg, Jan 10, 2020.

  1. voropserg

    voropserg

    Joined:
    Jan 11, 2019
    Posts:
    3
    Grapthics.Blit() with material is not working on Android. Screen is not being cleared.

    Using it in PostProcess script for outline rendering.

    Code (CSharp):
    1.     private void OnRenderImage(RenderTexture source, RenderTexture destination)
    2.     {
    3.         rt = new RenderTexture(source.width, source.height, 0);
    4.         rt.Create();
    5.         outlineCamera.targetTexture = rt;
    6.         outlineCamera.RenderWithShader(simpleDrawShader, "");
    7.         outlineMaterial.SetTexture("_SceneTex", source);
    8.         Graphics.Blit(rt, destination, outlineMaterial);
    9.         rt.Release();
    10.  
    11.     }
    12.  

    ARFoundation is in use, but i doubt it has anything to do with it