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


No "ColorkeyEnable" for Transparency on D3D8.0

Recommended Posts

RoyHsu2001    122
There is a quite convenient functions to set background of texture become transparent on D3D7.0 by setting IDirectDrawSurface7::SetColorKey and lpDev7->SetRenderState(D3DRENDERSTATE_COLORKEYENABLE, TRUE), but I can''t find the same parameter, "D3DRENDERSTATE_COLORKEYENABLE", of lpDev8->SetRenderState on D3D8.0, so it means this function is disable to let certain color of texture become transparent, right? Is there any alternative function to do? Can "ALPHATESTENABLE" , "ALPHAREF" AND "ALPHAFUNC" do the same thing? I will try later. Thanks for any suggestion! Roy

Share this post

Link to post
Share on other sites
S1CA    1418
ALPHATEST is absolutely the way to go!.

Some cards never really did colour keys anyway!, their drivers faked it using alphatest (which confused matters if you wanted to use colour keyed textures with alpha).

AlphaTest is the recommendation from the hardware manufacturers. 2D features aren''t what sells video cards - they concentrate all new development and testing on the 3D side of their hardware nowadays (one of the major reasons for DDraw being downgraded).

Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites