Archived

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

Fade in and fade out

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

Is there any good tutorials on the web for using the stencil buffer for fades. I''d like to start off by just fading an image onto the screen. Currently I have a panel class that I use to render menuscreens and logos etc.. would like to fade these in and out etc.. Thanks

Share this post


Link to post
Share on other sites
The stencil buffer is not used to store variable color or brightness values. It''s much like the depth buffer in that a test is done on the fragment currently being processed, and if the test passes, then the pixel is rendered. As such, varying the intensity of the pixel''s color (for doing a fade, where you start with no contribution from the image in question and end with full contribution from the image), is not a job for the stencil buffer, since it''s a modulation operation and not a simple yes/no test.

You might look into alpha blending instead.

Share this post


Link to post
Share on other sites
yes derr, I could use the stencil buffer to mask out areas say for a swipe from one frame to another but not for fades. What was I thinking???

heheh

Share this post


Link to post
Share on other sites