Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.beginners Subject: Re: transparency question Date: Mon, 24 May 1999 09:28:20 +0100 Organization: Sony Computer Entertainment Europe Lines: 20 Message-ID: <37490DA4.FA7A4042@scee.sony.co.uk> References: <7i3kv1$1186@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en] (Win95; I) X-Accept-Language: en Derek da Silva wrote: > > I want to fade an opaque foreground sprite into invisibility against it's > background (and back again) - kinda like the onscreen icons in Zelda64. In > terms of transparency rate, sprite brifghtness values, etc - how is this > effect achieved? The way I've seen it done is to have a grey mask in addition to your sprite. The mask is the same dimensions as your sprite, but all the non-transparent pixels are grey. Then you draw two sprites with semi-trans - Say you have a 'fade value' "f" between 0 (invisible) and 128 (visible), then you draw the mask with semitrans 100%-100% at brightness value f, then the sprite at the same position with brightness value f, but the semitrans mode is 100%+100%. James -- == James_Russell@scee.sony.co.uk ph: +44 (171) 447-1626 - fax: 390 4324 == Tools and Middleware Licensing Manager - Sony Computer Entertainment Europe How do you make Windows faster? Throw it harder.