Somebody know some site or tutorial explaining how to make the silhouette of an geometric model using GLSL?
to my knowledge silhouette detection is done on cpu. you traverse all edges of the model and check if one side is visible and the other is not (dot product face normal, view direction). that gives you an edge list.
the other method is using a edge detection filter on the depth buffer, combined with edege detection on normal buffer you can extract feature edges, too.
another trick is rendering only backfaces, but scaled or offset to the viewer, then front faces. There is also an older demo on toon shading stuff from nvidia which uses cubemaps or spheremaps dont remember.
You could also pass normals to the fragment shader, renormalize them and then check if they are perpendicular to the view direction.
or draw a wireframe version of your mesh first with a higher line width and then again in shaded mode.
they mention these methods and some in the Real Time Rendering book.
I believe Bruce Gooch did a lot of work in this and other Non-Photorealistic areas and wrote a very good book about it:
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.