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

Rendering Camera View

Discussion in 'Shaders' started by MauveAvenger, Jan 11, 2016.

  1. MauveAvenger

    MauveAvenger

    Joined:
    Oct 30, 2015
    Posts:
    4
    Hello,

    I know that normally when you use Grabpass on a shader, it takes whatever is behind the object and makes a texture out of it.

    However, instead of rendering what is behind the object, is it possible to render what is being seen by another camera?

    Thank you,
    Alex
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    Sure, with a RenderTexture you can render a camera view into a texture and use it in whatever way you want. This is a pro feature though.
     
  3. MauveAvenger

    MauveAvenger

    Joined:
    Oct 30, 2015
    Posts:
    4
    Thanks! I would like to try a solution that doesn't require Pro, but it's good to know RenderTexture is available as a last resort.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    It's a pro feature if you're using Unity 4, Unity 5 there's no difference between pro and free in terms of available features.
     
  5. MauveAvenger

    MauveAvenger

    Joined:
    Oct 30, 2015
    Posts:
    4
    Oh. Awesome, thanks!
     
  6. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    Ah, right, forgot they changed that. RenderTextures for everybody.