Search Unity

How to create a gameObject that behaves like a lens?

Discussion in 'General Graphics' started by PurePwnage, Mar 23, 2017.

  1. PurePwnage

    PurePwnage

    Joined:
    Feb 20, 2017
    Posts:
    2
    Hello everyone,

    how can a gameObject be created that behaves like a lens? I can create an object that looks like a lens, but how can the refraction be implemented? Is it possible to create an upside-down effect?

    (Background: In the game the player has to assemble binoculars. At one point he find lenses that should behave as real lenses until they are used.)

    Thank you!
     
  2. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    You can render a cube map from your scene and flip the textures upside down. And use a shader that let you add a cubemap for reflections.