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.
  2. Dismiss Notice

Question Whats the correct way to resolve "'RenderingUtils.fullscreenMesh' is obsolete"?

Discussion in 'Universal Render Pipeline' started by AndrewCzarnietzki, Feb 27, 2023.

  1. AndrewCzarnietzki

    AndrewCzarnietzki

    Joined:
    Jul 23, 2013
    Posts:
    186
    Hey,

    After upgrading, we now have a number of these:

    warning CS0618: 'RenderingUtils.fullscreenMesh' is obsolete: 'Use Blitter.BlitCameraTexture instead of CommandBuffer.DrawMesh(fullscreenMesh, ...)'

    These are mostly in unsupported assets that we want to do minimal support for. Instead of rewriting them from scratch, we'd prefer to do the smallest adjustment possible. What is the correct process for adjusting these?


    Code (CSharp):
    1.                   if (xTextureSwap.Swap())
    2.                     {
    3.                         cmd.SetGlobalTexture(xSourceTex, cameraColorTarget);
    4.                         material.SetTexture(xTexture, xTextureSwap.TAATextureB);
    5.                         cmd.SetRenderTarget(xTextureSwap.XTextureA);
    6.                         cmd.DrawMesh(RenderingUtils.fullscreenMesh, Matrix4x4.identity, material, 0, 0);
    7.                         cmd.SetGlobalTexture(taaSourceTex, xTextureSwap.XTextureA);
    8.                         cmd.SetRenderTarget(cameraColorTarget);
    9.                         cmd.DrawMesh(RenderingUtils.fullscreenMesh, Matrix4x4.identity, material, 0, 1);
    10.                     }

    Thanks!
     
  2. jack-gravitysketch

    jack-gravitysketch

    Joined:
    Jun 30, 2022
    Posts:
    5
    +1 to this question!
     
  3. diesoftgames

    diesoftgames

    Joined:
    Nov 27, 2018
    Posts:
    114
    +1, would love a simple sample for this
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,891
    +1000,

    Also why is Unity team breaking things without any easy explanation on how to replace them ?
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,891