Jump to content
  • Advertisement

Archived

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

PmanC

Masking hit

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

hello... I just finished a program that uses 3 masked objects, and the framerate is very low(15-20). is there a way i can speed up masking? i don''t want to use the alfa channel because i want the program to work on every computer. -PmanC

Share this post


Link to post
Share on other sites
Advertisement
??! um.. alpha testing is supported by nearly every video card i can think up.. are you thinking of something else?

Share this post


Link to post
Share on other sites
Try disable vsync on ur card. Im not sure, but it may be possible to do masking with multitexturing, that is changing blend functions when you bind the different textures. Havn''t tried it yet though...

Share this post


Link to post
Share on other sites
v-sync will have no effect.
as I''ve said before, masking is the poor mans alpha testing. Simply load a 4 channel image, and set the appropriate mask. You don''t need to be using blending to use alpha testing.

glEnable(GL_ALPHA_TEST);

glAlphaFunk(GL_NOTEQUAL,0);

or whatnot.
as far as I can tell, the hit that alpha test has is next to nothing. so it''s a good idea to use it all the time, and any textures that are blended (eg additive) should have black areas set to 0 alpha, etc. This will save fill rate.

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!