|
84741 packages online
|
|
|
|
dev/src/fading_tut-os4.lha |
|
No screenshot available
|
|
Notes from Spot. Hi Varthall, I found what you need to finish that port.
Enjoy!
Thanks mate, much appreciated ^^ /Varthall
-----
Fading
This little page is about fading. It describes the technique which slowly lets
an image appear or disappear from the screen. A split-off from the "appear"
techique is called a cross-fade. Most people (including myself) like these
tricks because it looks so cool.
The regular apprauch is that each frame during a fade, all RGB values of the
pixels get modified by a certain amount, which makes the screen become darker or
brighter (depends on the fade-option).
There are two disadvantages to this apprauch:
Pixel-operations are slow, especcialy when done in video memory
Pixel-operations depend on the bit depth. Each bit-dept (8, 15/16, 24, 32) needs
it's own implementation
In this page, I'd like to show another way to make a fade. (I explain it for
fading out, but for fading in it's just the other way around.) Alphablending. In
stead of making the screen-surface darker, we go blend a black surface over it.
If we slowly increase the aplha value from 0 (not visible ) to 255 (fully
visible), the screen seems to get darker and darker, simulating a fade-out.
When this technique is beeing used on a modern videocard, where alphablending is
hardware accelerated, you have the fade almost for free, and for each bit-dept.
:-) |
Contents of dev/src/fading_tut-os4.lha
PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 1332 2637 50.5% -lh5- ef4f Jul 30 2002 fadingv3/Docs/fading.htm
[generic] 160609 390988 41.1% -lh5- fae7 Oct 9 2006 fadingv3/fading.exe
[generic] 19184 975798 2.0% -lh5- 4f6b Sep 28 2002 fadingv3/img1.bmp
[generic] 1395 921654 0.2% -lh5- c184 Sep 28 2002 fadingv3/img2.bmp
[generic] 1482 6332 23.4% -lh5- 8626 Sep 30 2002 fadingv3/Source/fading.c
[generic] 249 533 46.7% -lh5- d7cd Sep 30 2002 fadingv3/Source/fading.h
[generic] 790 2291 34.5% -lh5- af0a Sep 28 2002 fadingv3/Source/main.c
[generic] 90 104 86.5% -lh5- 6eed Oct 5 2002 fadingv3/Source/Makefile
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 8 files 185131 2300337 8.0% Feb 13 06:32
|
|
|
|
Page generated in 0.02 seconds |
Aminet © 1992-2024 Urban
Müller and the Aminet team.
Aminet contact address: <aminetaminet net> |