Jump to content
  • Advertisement
Sign in to follow this  
sqpat

Trouble with d3dxsprite and lighting

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!