Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mirrorreflectionscript

Discussion in 'Shaders' started by Jesper Johansen, Aug 31, 2007.

  1. Jesper Johansen

    Jesper Johansen

    Joined:
    May 23, 2007
    Posts:
    51
    I've been looking in to this script lately, and Aras have helped me to get it to work.

    Today it tried out some fun with it, and I came up with a result I can recreate but NOT safe... here's an explanation.

    I've added the mirrorreflection script and shader to a non-flat object. When I press play The object seems flat. I pause the gameview (!), and in scenevirew select the object. The I change the objects shader to glossy and to BaseRGB I connect the texture way down at the bottom in the list, that actually has no name, but has a RT icon.

    This works great, I have reflections and shape on the object... until I stop the game in gameview. Then it jumps back to the initial mirrorrefelction-shader, and I cannot recreate the setup, as the texture has disappeared.

    I know the texture is only created during play. But how would I go about combining the two shaders?

    Can I duplicate the glossy shader, and just add the ARB vertex program, and renaming the _Maintex and _SpecColor to _ReflectionTex and _Reflectcolor ? Well, I tried this and that did'nt work, so any help is highly appreciated.[/code]