Skip to main content
GameDev.net gamedev.net
🔒 Locked

Line width?!

Started by Omid Aug 11, 2002 at 7:39 PM 3 replies 400+ views
Original Post
Omid
Omid
"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
Tessellator
Tessellator
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
jtech
jtech
quote:

...screen aligned quads.



You mean camera-facing quads? That would probably work. Lines don''t
have shading, so probably have to turn off lighting.
AeroBLASTER
AeroBLASTER
yes i think cel-shading techniques pretty much always involve turning off lighting...
---DirectX gives me a headache.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.