DirectX 2D Lighting

Started by
1 comment, last by vermilion_wizard 14 years, 11 months ago
Is it possible to have lighting in 2D? I assume so but is it possible to light simple lines? I have a buffer or lines drawn with:
d3ddev->DrawPrimitive(D3DPT_LINELIST, 0, nl/2)
Is it possible to apply lighting to this? If so if someone could point me in the right direction to a beginner's tutorial/explanation I would be very thankful. Thanks for your time, - Mike
Advertisement
Bump
If you are using the fixed function pipeline, then your vertices will need to have normals, but I don't know if that will work for lines or not. If not, then I think you need to write a shader to do it. This won't be any different from writing a shader for lighting triangles, and there are plenty of tutorials available on that topic.

This topic is closed to new replies.

Advertisement