Jump to content
  • Advertisement
Sign in to follow this  
Gambit007

2 managed DX questions

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

These come from the artist in my programming group. 1) How do you assign an FX file to a mesh? 2) How doe you render a mesh with a texture that has alpha information? Right now when rendering the texture the alpha values are all black. I tried setting the device up for alpha blending before rendering the first subset of the mesh, but this made it so we could see through the entire mesh in the alpha areas.

Share this post


Link to post
Share on other sites
Advertisement
Well question number one is beyond my level of knowledge now. I can point you to here: "(SDK root)\Samples\C++\Direct3D\PostProcess" where it has been done, but it is a microsoft sample, so good luck with that one.

Question number two I can give you some more info about, the following commands will enable alphablending:

g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
g_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_INVSRCALPHA);
g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCALPHA);



You need to experiment with the last arguments of the last 2 statements. The key of alpha blending lies there.

I hope this helps you someway somehow...

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!