View Full Version : how to show silhouette using GLSL
05-06-2006, 03:28 PM
Somebody know some site or tutorial explaining how to make the silhouette of an geometric model using GLSL?
05-07-2006, 02:45 AM
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.
05-30-2006, 03:01 PM
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:
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.