Jump to content
  • Advertisement
Sign in to follow this  
Scorpide

[DirectX] Alpha blending + light

This topic is 3537 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

Hi, That's my first post in this forum :) I've got a problem. I'm experimenting with some basic blending. Now I'm doing a semi-transparent cube. I've done it and it's perfectly working, but now there is another threat - I cant add light to it. When I set
d3dDevice->SetRenderState( D3DRS_LIGHTNING, TRUE );
and turning a light on, no light appear and semitransparency dissapear. I cannot find it anywhere on the Internet... Please help me!

Share this post


Link to post
Share on other sites
Advertisement
Are you setting a material up (IDirect3DDevice9::SetMaterial())? Do your vertices have normals? Any output from the Debug Runtimes? Have you added normals to your vertex declaration, or FVF code?

Share this post


Link to post
Share on other sites
Yes, I have set everything. Lights are working properly without alpha blending, but with semitransparency it doesn't work ;(

Share this post


Link to post
Share on other sites
Quote:
Original post by Scorpide
Yes, I have set everything. Lights are working properly without alpha blending, but with semitransparency it doesn't work ;(
Can we see your code? If it's quite large, is it possible to reduce it down to a small test case?

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!