Hello,
I try to determine which vertices are lying on the border of the object (in current perspective). My idea was to render the full object once to a texture and then erode it (makes the object a bit smaller). Then render only the vertices as points and compare it with the eroded image. Every vertex lying on a colored area should not be a vertex on the contour, because of the erosion.
In short:
- Rendering full object once with erosion
- Rendering only vertices as points
- Compare rendering [1] & [2] and determine points in [2] which are not colored in [1].
In the end I want to have a list of vertices defining the outer contour (no suggestive contours) of the object.
How could I do this efficiently? Render to texture and compare in on cpu? Or is there a better method doing it with shaders and transform feedback?
Thanks for your help!