OS4 DepotLogo by Marko 
(anonymous IP: 3.235.172.213,1489) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (330)
   o Datatype (49)
   o Demo (188)
   o Development (553)
   o Document (21)
   o Driver (89)
   o Emulation (143)
   o Game (887)
   o Graphics (475)
   o Library (103)
   o Network (212)
   o Office (57)
   o Utility (835)
   o Video (62)

Total files: 4004

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Document » Tutorial » fading_tut.lha

Fading_tut

Description: An SDL tutorial on Fading for Varthall :)
Download: fading_tut.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 181kb
Version: 3
Date: 24 Sep 2006
Author: Patrick Kooman, AmigaOS 4.0 compile by Spot / Up Rough
Submitter: Spot / Up Rough
Email: spot/triad se
Homepage: http://www.2dgame-tutorial.com/sdl/index.htm
Requirements: SDL
Category: document/tutorial
License: Other
Distribute: yes
Min OS Version: 4.0
FileID: 2110
 
Comments: 1
Snapshots: 0
Videos: 0
Downloads: 332  (Current version)
332  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
Notes from Spot. Hi Varthall, I found what you need to finish that port.
Enjoy!

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.
:-)



Copyright © 2004-2020 by Björn Hagström All Rights Reserved