Archived

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

PmanC

Masking hit

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