- Home /
How to use the silhouetted outline shader from the wiki?
Hey guys, I'm trying to use the silhouetted outline shader from the wiki (the first one): http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse
However, when I just copy the code into a new shader file, I get the following warning on the editor console: Shader warning in 'Outlined/Silhouetted Diffuse': Both vertex and fragment programs must be present in a CGPROGRAM. Excluding it from compilation. at line 106 (on )
That's this bit of the code:
CGPROGRAM
#pragma vertex vert
#pragma exclude_renderers gles xbox360 ps3
ENDCG
I see that there is no fragment shader defined here but just copying "#pragma fragment frag" yields an error. As this is code from the wiki, I thought it would kind of work out of the box but maybe it has something to do with newer Unity versions (I'm using Unity 5). I don't know much about the shader stuff in Unity, so if someone has an idea how I could solve this issue, it'd be much appreciated. Thank you in advance!
Answer by ahaugaa · Mar 31, 2015 at 06:10 AM
I just commented those lines out and it worked alright.
Your answer
Follow this Question
Related Questions
Combine Shaders 0 Answers
Is there a shader to draw outline of a solid sphere in unity 20.1.0a12 , that works in unity WebGL? 0 Answers
Shader Assitance: Sprite Outline Color, Hidden Object -1 Answers
It there Outline for TileMap tile? 1 Answer
Exclude outline only, from fog, in custom toon shader. 1 Answer