[.net] Lighting on textured poly's

Started by
2 comments, last by slyprid 18 years, 10 months ago
I don't know if this is possible, but i'm working on a 2D engine using Direct3D and trying to do some lighting effects. I figured it shouldn't be an issue, but its proved me wrong. I've created block polygons and use them as my tiles, each of them have a texture on them. What I want to do is use lighting to add some lights to the scene, but nothing seems to be showing up. I add a mesh to the screen though, and the light appears on it. Is this possible, or do I need to dynamically create meshes as my tiles? Thanks for your time. Slyprid
Advertisement
Out of curiosity, what kind of vertex type are you using when you render out your 2D tiles?
Michael Russell / QA Manager, Ritual EntertainmentI used to play SimCity on a 1:1 scale.
There's also the issue of tesselation; if you want lights to wash out nicely across a tile, you will need to make that tile of many vertices. Unless you apply per-pixel lighting to the tiles, using a pixel shader -- that'd work, too.
enum Bool { True, False, FileNotFound };
I'm using CustomVertex.PositionNormalTextured as the vertex type. Since i'm only using 4 verticies, I guess I will look into pixel shading, unless their is another method.

Slyprid

This topic is closed to new replies.

Advertisement