Lighting on textured polys

slyprid
06-05-2005, 11:24 PM
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

DecemberChild
06-06-2005, 05:11 AM
I'm not 100% sure, but it could depend on what Vertex Structure you're using. If you are'nt already doing it, try to use a structure containing normal data as well. As I said, I can't guarantee that it will work, but I have experienced that if I don't use vertex normals when rendering primitives from a vertex buffer, the lighting never seems to work the way it's supposed to.

slyprid
06-06-2005, 11:13 AM
Well i'm using CustomVertex.PositionNormalTextured as the type for the verticies. So will check my lighting code, maybe the lights are behind the surface or something.

Slyprid

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum