Archived

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

Texture transparency RGB->ARGB

This topic is 5676 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! I''ve small problem. I want to make my texture transprency. That textures should appear (smoothly) and after some delay disappear. The format that texture is stored is RGB. I want dynamicly change alpha. That I must in every frame lock surface, making: for( x = 0; x < 256; x++) for( y = 0; y < 256; y++) pixels[y*256+x] = D3DCOLOR_ARGB(r,g,b,a); // some like that unlock surface. Why SetMaterial color ARGB does''nt work? Any ideas.

Share this post


Link to post
Share on other sites
The material alpha can be set i think with renderstates however iam not sure if the material alpha cares that much .. (sorry if that sounds a bit stupid;-) since iam not sure but the materials are supposed to be only for shadings with light and no card or whatever today supports ARGB for lighting just RGB..

However(again) you can always set the alpha in vertices wich should be faster

Share this post


Link to post
Share on other sites