Wireframe support
#1
Hello,

I need to display my 3D model with wireframe mode.

Using Ab3d.DirectX.Materials.LineMaterial I managed to do it but hidden lines are visible. There is a way to show only standard lines without drawing model two times? Maybe a shader solution?

Thank you
Leonardo
#2
The most efficient way to hide the hidden lines is to render the object two times: once with wireframe and then as solid object (usually with a background color). This way you can use the graphics card to use depth buffer to remove the hidden lines and this is very fast.

I know that there are some algorithms that can calculate the visible parts of the lines. But I imagine that this algorithm can be quite complex and should be done on CPU each time camera or lines are changed. This would be surely more time consuming that rendering all the objects twice.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)