   Better Cel-Shading Outlines?
  Does anyone know about implementing the black border outlines used when cel-shading (or know of any good articles)? Right now I am rendering a pass with a thick-lined, front-face culled, wirframe. This works, and is pretty much the standard way of doing it, as far as I can tell. But the quality is a little low for my purposes. I've heard there are better ways of doing it, but I haven't been able to find any articles or anything on any other techniques. I would like to possibly find a way of implementing it in my shaders, in a manner that would allow for single-pass rendering. Any thoughts?   
  If you have any kind of per-pixel normal data, you can use this to draw very nice black outlines (not just a silhouette but outlines even within the silhouette). Just compute the dot product of the view vector and the normal of a surface, if this is 0, shade it black no matter what. You can also change this to shade to black given a certain threshold, to get thicker lines (although this won't be uniform in screen space, steeper changes in normal direction will result in smaller outlines for a given surface)   ;  That's a really good idea, but I'm not currently using any normal maps. It's something I may consider though...;  By using the normal, he means the normal of each triangle in the mesh.  No normal map is needed.On a side note:  What school in Orlando do you go to?   ;  You could do a two pass rendering system to gain an outline effect.  The basic idea goes like this:Pass 1:Render like normal with z write enabledPass 2:Switch triangle culling mode (from counter-clockwise to clockwise or vice-versa).  Render the geometry but extend the vertices in their normal direction in the vertex shader.  Output a solid color for the outline.This allows a quick and easy way to get the outline.  I use this method in my game linked to in my signature.  If you would like, you can check out the .fx file in the download for an implementation (sorry, directx only) and to see how it looks.  I have found that this method is typically faster than the normal dot view vector method described above on older hardware.  Hope this helps.   ;  For per-pixel normal data you can pass normals to the fragment processor using a free texcoord register. So instead of using the normal to calculate lighting in the vertex shader, pass this normal to the fragment processor and it will automatically be interpolated across triangles - per pixel normal data.   ;  I dont recommend the method of using normals to make the outline.. while it does work to some extent, the result is often broken and uneven..   ;  I'd go with Jason Zink's technique - it produces crack free results - and looks good:;  Check out this paper: Cartoon-Looking Rendering of 3D-ScenesIt describes an algorithm for drawing outlines based on depth and normal discontinuities. It isn't single pass but the quality is very high.   ;  Yeah, the technique that JZ described is pretty much the standard one. Using face normals sounds like a good idea, but it's not hard to find failure cases. I've worked on a commercial (console) game with character outlines, and it uses the two-pass method.   