How do I prevent jagged edges alongside the surfaces of my 3d model?
- by badcodenotreat
Lets say I've implemented in openGL a crude model viewer with shading which renders a series of blocks, such that I have something that looks like this.
http://i.imgur.com/TsF7K.jpg
Whenever I rotate my model to the side, it causes an unwanted jagged effect along any surface with a steep viewing angle.
http://i.imgur.com/Bgl9o.jpg
I'm pretty sure this is due to the polygon offset I used to prevent z-fighting between the model and the wireframe, however I'm not able to find the factor/unit parameters in openGL which prevent this unwanted effect.
what are the best values of factor and unit for glPolygonOffset to prevent this?
would implementing anti-aliasing alleviate the problem? is the trade off in performance trivial/significant?
is this perhaps a shading issue? should i try a solution along this line of thought?