Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Uniform Transparancy [DIRECT3D]

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

Is there a way to render a triangle uniformly transparant with only using D3DVERTEX? I''ve read somewhere, that you use D3DTLVERTEX, and set the color values of each Vertex, and in this you can also set the alpha value since the color uses the D3DCOLOR type which is DWORD (RGBA). But I don''t want to use this D3DTLVERTEX/D3DLVERTEX structure, partly because it''s bigger, and secondly because I initially based my code on D3DVERTEX thinking that this would''nt be a problem. I was wondering if I could use the SetMaterial functions to specify the Alpha blending value. If I can, then would the following render states be appropriate? pdev->SetRenderState(D3DRENDERSTATE_SRCBLEND,D3DBLEND_SRCALPHA); pdev->SetRenderState(D3DRENDERSTATE_DESTBLEND,D3DBLEND_INVSRCALPHA); pdev->SetTextureStageState(0,D3DTSS_ALPHAOP, D3DTOP_MODULATE); [Thats just copied from the place that I read about this] Basically, all I want is the ability to specify the alpha blend range between (0 & 1 or 0 & 255), without majorly modifying my code. On the N64, specifying the blending was just as simple as: setalphavalue(64); // 0-256 ...and magically the RDP processer took this value as the Alpha Src (64) and the Alpha Dest (256-64) /Memir

Share this post

Link to post
Share on other sites

  • 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!