Skip to main content
GameDev.net gamedev.net
🔒 Locked

Masking hit

Started by PmanC Jul 27, 2002 at 8:03 PM 2 replies 400+ views
Original Post
PmanC
PmanC
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
Wavarian
Wavarian
??! um.. alpha testing is supported by nearly every video card i can think up.. are you thinking of something else?
llvllatrix
llvllatrix
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...
RipTorn
RipTorn
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.