# Trouble with d3dxsprite and lighting

## Recommended Posts

sqpat    122
okay this is weird. i do
p_dx_Device->SetRenderState(D3DRS_LIGHTING,false);
and then i do
charSprites->Begin(D3DXSPRITE_SORT_DEPTH_BACKTOFRONT | D3DXSPRITE_ALPHABLEND | D3DXSPRITE_OBJECTSPACE)
when i draw my sprites, they should look like this: http://sqpat.com/project/mysample23-spriteobjectsbetter.PNG but then they sometimes look like this at certain distances/angles http://sqpat.com/project/mysample24-spriteobjectsworse.PNG The color argument to the draw calls are fixed to a variable. Not only that but it seems like it cant be something that simple because the color that shows up on the sprite isnt a solid color change (you can see the top is more green that white and the bottom is the whitest in that 2nd pic) Anyone know what's up with this behavior?

##### Share on other sites
ET3D    810
Are you taking about the alpha blended quads in the second picture. If so, then I assume you're drawing with the incorrect pixel shader of texture stage states. (Though could also be using the wrong texture.)