[DirectX] Alpha blending + light

Started by
3 comments, last by Scorpide 15 years, 5 months ago
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!
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?
Yes, I have set everything. Lights are working properly without alpha blending, but with semitransparency it doesn't work ;(
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?
No problem, it's here:
http://nopaste.gamedev.pl/?id=2811

This topic is closed to new replies.

Advertisement