rotating faces to face the camera?
I want to draw an antialised wireframe cube, with lines of a certain width (greater than 1). In OpenglES 2, on my devices at least, this isn't supported.
I've had some success drawing 2D antialiased lines, by using the trick of drawing an extra rim of polygons along the edge, with the outermost vertices transparent.
But if I were to do that in 3D, the polygons comprising a line would form a flat ruler shape, and it would change depending on the angle I looked at it. I was thinking I might be able to get it to work by rotating the polygons to face the camera. Has anyone done that? Will it work to achieve what I want?
I think I would start with the 8 cube vertices. Then for each segment in the cube, I would create two more vertices at each endpoint, extending perpendicular to the segment on the plane facing the camera. Does that make sense? Anyone know how to compute those?
Nobody? What do most people do if they want to draw antialiased lines in 3D space?
Use multisampling and let the hardware do it for you.
But if the 'lines' are in 3D, you still have the problem of them becoming invisible when seen edge-on.
Last edited by tonyo_au; 02-06-2013 at 05:36 PM.
Yes I think that is what I want! Unfortunately OpenGLES2 doesn't do geometry shaders, but that article mentions an earlier technique that does not need them.