Sign in to follow this  
sqpat

Trouble with d3dxsprite and lighting

Recommended Posts

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 this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this