&overlay transparency
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
&overlay transparency
Would it be possible to set a single colour in the overlay to be fully transparent?
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
My original plan was to allow you to provide a
custom overlay function. Nobody seemed interested
so it never got done. I've written it down but there
are suddenly a lot of cards ahead of it.
There are 512 possible colors in the Atari viewport.
Many are genrally not used. An overlay has 256 colors.
That is 128k different combinations. A complete table
of 16-bit colors would require 256k bytes. That is one
way to go and is totally arbitrary. But it is big.
Another way to go is to let you write 'pseudo-code'
to generate a resulting color for each of the possible
128k possibilities and then it would be computed at runtime.
or something like that. It says that if the overlay color
index is number 33 use the viewport color else use transparency
as we do already. And we could add functions as
needed - like modifying the colors for the current light level.
custom overlay function. Nobody seemed interested
so it never got done. I've written it down but there
are suddenly a lot of cards ahead of it.
There are 512 possible colors in the Atari viewport.
Many are genrally not used. An overlay has 256 colors.
That is 128k different combinations. A complete table
of 16-bit colors would require 256k bytes. That is one
way to go and is totally arbitrary. But it is big.
Another way to go is to let you write 'pseudo-code'
to generate a resulting color for each of the possible
128k possibilities and then it would be computed at runtime.
Code: Select all
OI 33 = IF VC ELSE OC Trans % VC 1-Trans % +% THEN
index is number 33 use the viewport color else use transparency
as we do already. And we could add functions as
needed - like modifying the colors for the current light level.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA