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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Clipping in camera render to texture result

Discussion in 'General Graphics' started by Nieles_GH, Feb 14, 2018.

  1. Nieles_GH

    Nieles_GH

    Joined:
    Jun 26, 2017
    Posts:
    57
    I'm trying to create a low res blur image from the camera's view to create a cheap static blurred background image. I have it all working except that the renderer texture result shows objects clipping through each other.

    Camera view:
    upload_2018-2-14_10-16-4.png

    Rendered low res image:
    upload_2018-2-14_10-16-34.png

    Here is the code that renders the texture:

    Code (CSharp):
    1. m_Camera.Render();
    2.  
    3. RenderTexture.active = m_BlurRenderTexture;
    4. m_BlurTexture.ReadPixels(new Rect(0, 0, m_BlurRenderTexture.width, m_BlurRenderTexture.height), 0, 0);
    5. m_BlurTexture.Apply();
    6. RenderTexture.active = null;
     
  2. juliens137

    juliens137

    Joined:
    Oct 2, 2017
    Posts:
    26
    Hey did you ever solve this?
     
  3. Nieles_GH

    Nieles_GH

    Joined:
    Jun 26, 2017
    Posts:
    57
    No, the project got cancelled so I stopped working on it :)
     
  4. Nik_maierle_igt

    Nik_maierle_igt

    Joined:
    Sep 26, 2022
    Posts:
    1
    upload_2023-3-7_14-15-8.png
    This has to be turned on on the camera. Half a day, gone :D