Search Unity

Silhouette-Outlined Diffuse from wiki for highlighting objects, I think I am using it wrong?

Discussion in 'Shaders' started by codejoy, May 29, 2015.

  1. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    So I was using this wiki here:

    http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse

    to build the shader there, add it to a material and then add that material to my sphere. It sort of works, gives it a black outline like a toon shade. I am new to shaders and materials but trying to write a selection highlighting code script for a friend. The problem is, I think I am doing this wrong. I mean it works but if I have a real model with a real material for texture over it, it would trash that and give it a white like material with the outline I think if I were to in code swap the materials when the object is selected. So I think the above wiki perhaps assumes you have two meshes? one of your main model textured light etc, and another that gets this material that is perhaps slightly larger than your main model? or am I just totally using this wrong.
     
  2. ecreators

    ecreators

    Joined:
    Oct 23, 2016
    Posts:
    7
    wiki url is not resolvable anymore, what a pitty