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 How to render half scale only de game view, no UI?

Discussion in 'Universal Render Pipeline' started by yackson-cc, Jul 12, 2023.

  1. yackson-cc

    yackson-cc

    Joined:
    May 14, 2016
    Posts:
    46
    Hi, please, i need render only the game in 75% of resolution, but is no working, i am using render pass feature to do this, additional i want to know how exclude UI from this, i want to do this by performance approach not by visual style. upload_2023-7-12_10-51-17.png
    Thanks!
     
  2. AshwinTheGammer

    AshwinTheGammer

    Joined:
    Sep 23, 2016
    Posts:
    68
  3. yackson-cc

    yackson-cc

    Joined:
    May 14, 2016
    Posts:
    46
  4. yackson-cc

    yackson-cc

    Joined:
    May 14, 2016
    Posts:
    46
    Please, some one that can helpme?
     
  5. AshwinTheGammer

    AshwinTheGammer

    Joined:
    Sep 23, 2016
    Posts:
    68
    what i did is that
    i create a raw image and made it strech(covering whole screen) then by script
    i generate the render texture at runtime and assign it to first the camera's rendertexture then send to rawImage
    by this means whatever the camera sees it sends to rawImage now write some code to change the rendertexture's resolution using slider or something...

    Camera cam;
    RawImage img;
    targetWidth = Screen.height;
    targetHigh = screen.width;
    RenderTexture renderTexture = new RenderTexture(targetWidth, targetHeight, 24);
    cam.targetTexture = renderTexture;
    cam.Render();
    img.texture = renderTexture;