- Home /
Outlined Shader Shadows
So the story is about the Silhouette Outlined Diffuse shader I'm using from here:
http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse
Short story: How do I get this shader to display shadows and a complete outline.
I'm using this shader because the default importable toon shader does not render plane outlines (which this does.... slightly). The MAIN problem, as you can tell, is that when switching from diffuse to this (to represent highlighting of the terrain tile), the shadows from the directional light in my scene do not render. Having no background or clue about shaders, I wouldn't even know where to begin, as I know they are a beast to tackle and learn.
The second, less important thing is that the outline does not render (the V corner of the tile) when I'm facing toward the inside from the outside of the plane (like I have to be on the inside of the plane to see all 4 edges).
I know this is an old thread, but were you able to solve your issue? I'm having the same problem. I'm using an outline shader, but it's not displaying shadows. I've tried adding Fallback "Diffuse" or "VertexLit" at the bottom, but that doesn't do the trick either. Any luck?
Unfortunately, no. This very rare case of having a 2D plane messing with the shader is not very functional. If at all possible, stick with built in.
I'd recommend converting this to a surface shader, as fragment shaders aren't meant for lighting in Unity anymore. Depending on the version of unity you are using, I can help you do this.
Your answer
Follow this Question
Related Questions
Silhouette Toon Shader 0 Answers
Shader: Outlined Diffuse with Vertex Color? 1 Answer
Making a silhouette outline shader 4 Answers
Silhouetted-Outlined Shader not working with baked lights. 1 Answer