Jump to content
  • Advertisement

Archived

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

vrihai

From Opaque to Transparent

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

I want to blend a textured primitive from completely opaque to completely transparent. TextureStageState: D3DTSS_ALPHAOP, D3DTA_TFACTOR Renderstates: D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA D3DRENDERSTATE_TEXTUREFACTOR, (RGBA Value) (Only the Alpha Value is used.) This seems to work for me, but I''m thinking there might be a more simpler method (and more compatible with older gfx cards). What I''m actually trying to do make the screen fade away when the camera switches to another pos (like they do in movies.)

Share this post


Link to post
Share on other sites
Advertisement
I think that what you''re trying to do is called a ''Gamma Ramp'' in DirectX.

Check it up, there''s bound to be a way in OpenGL to alter the gamma of the whole scene in a single go. Much less overhead than a full-screen pixel-by-pixel alpha blend, IMHO.

=^.^= Leaders and teachers should remember: It is best to offer others what they Need not what they Want.

Share this post


Link to post
Share on other sites
I don''t think that''s what he means. Doesn''t gamma just adjust the brightness/contrast of your screen, so that if the scene looks dark on your monitor, you can brighten it via the software?

What I think vrihai means is take a textured primitive, and slowly lower the alpha, so that it becomes more and more semi-transparent, and in the end will be completely invisible. No idea (yet) how to do that, though.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!