Sign in to follow this  

opacity for a 3d Object

This topic is 3337 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 all.. I built a simple FPS game using Directx8..now I put a point light,it works,i changed the material,it works,but when changing the alphachannel value for some object..nothing happens,I just want to make a 3d object (mesh) to have opacity.. example: 'setting the D3DCOLORVALUE dim c as D3DCOLORVALUE c.A=20:c.r=50:c.g=40:c.b=100 dim mt as D3DMATERIAL8 mt.ambient=c mt.emissive=c mt.diffuse=c mt.power=10 d3ddevice.setmaterial mt . . . so, can someone tell me what to do..

Share this post


Link to post
Share on other sites
Did you enable alpha blending? You need to set D3DRS_ALPHABLENDENABLE=TRUE, D3DRS_SRCBLEND=D3DBLEND_SRCALPHA and D3DRS_DESTBLEND=D3DBLEND_INVSRCALPHA for "normal" alpha blending.

The exact values of those render states will depend on what language you're using.

Share this post


Link to post
Share on other sites

This topic is 3337 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.

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