Archived

This topic is now archived and is closed to further replies.

Omid

Line width?!

Recommended Posts

"First, we set the line width - 2 or 3 pixels wide normally gives a nice effect" This is an outskirt from Sami''s Cel Shading Article. I''m wondering how you are supposed to set the line width for wireframe rendering in DX :S thanks in advance regards, /Omid

Share this post


Link to post
Share on other sites
The quick answer is you can''t.

The more useful answer is that to draw lines with any thickness other than 1 pixel in d3d, you have to construct them yourself using screen aligned quads. Essentially, I''ve been told this is what many drivers do internally under OpenGL anyway (where you can set line width).

There was a Code of the Day some months back on www.flipcode.com called "Textured Lines" (you should be able to find it pretty easy) which shows how to create screen aligned quads for this purpose.

Hope that helps,
T

Share this post


Link to post
Share on other sites