DepthTexture.OnRenderImage C# (CSharp) Method

OnRenderImage() protected method

protected OnRenderImage ( RenderTexture sourceTexture, RenderTexture destTexture ) : void
sourceTexture RenderTexture
destTexture RenderTexture
return void
    protected void OnRenderImage(RenderTexture sourceTexture, RenderTexture destTexture)
    {
        if (shader != null)
        {
            // Copy the source Render Texture to the destination,
            // applying the material along the way.
            Mat.SetFloat("_DepthPower", depthPower);
            Graphics.Blit(sourceTexture, destTexture, Mat);
        }
        else
        {
            Graphics.Blit(sourceTexture, destTexture);
        }
    }