- Home /
Edge outline & 2D shadow Shader for planar mesh
Hi,
I'd like to achieve this kind of effect in Unity 4:
(Left: the bland present -- Right: the appealing future)
The star object is a triangulated planar mesh in space, seen in perspective.
I expect a shader to do the job, which basically consists of 2 effects: a simple Flash-like bevel (or edge outline) for white & black outline strokes, and a simple 2D-style drop shadow.
The 'bevel' effect could be as simple as a white outline for edges pointing +z, and a black outline for edges pointing -z
The shadow effect could be made with actual shadows in Unity (I don't need actual 2D shadow fx, it's just the visual style I am looking for) but I would have to add a light and an invisible plane under the mesh to catch the mesh' shadow. I still hope a similar effect could be achieve much more efficiently with a shader.
I am targeting iOS so I cannot afford expensive processes.
For the outline effect I began to look towards the Toon Basic shader, yet it creates an outline from backfaces (using normals angles), which does not apply in my case since my objects are completely planar (2D meshs) and don't have backfaces; instead, I would need an outline effect on boudary edges.
Has anybody already dealt with similar shaders (simple/2D-style bevel or 2D-style shadow), or could somebody help me on the matter or point me to practical sources?
I am noob with shaders but willing to dive into it, providing I am given directions. :)
Thanks!
Did you found some solution of this? Can you share? Thanks!
Your answer
Follow this Question
Related Questions
Outlined Shader Shadows 1 Answer
Shader for mesh to project onto sprite? 0 Answers
Outline Overlapping Game Objects 1 Answer
Outline for ui 0 Answers
Shader vs Sprites - Sorting layer (ZWrite Off not working) 1 Answer