Page 1 of 3

VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 1:56 am
by svenvandevelde

 

Would it be possible in the future releases of the X16 to patch to the VERA with an RGB + alpha channel in the palette definition matrix? Where VERA would support RGBA. So 16 bits for red, 16 bits for green, 16 bits for blue and 16 bits for transparency?

 

 


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:05 am
by Elektron72

It would probably be possible, but 16-bit RGBA is more detail than is used for most modern images (most modern images use 8-bit RGBA), so it would definitely compromise the retro aspect of the X16.


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:08 am
by svenvandevelde


4 minutes ago, Elektron72 said:




It would probably be possible, but 16-bit RGBA is more detail than is used for most modern images (most modern images use 8-bit RGBA), so it would definitely compromise the retro aspect of the X16.



Sorry, I wrote my text wrong I see... I'll need to change it ...


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:13 am
by Lorin Millsap
Sorry, I wrote my text wrong I see... I'll need to change it ...

So you want an 8 bit CPU to handle 64 bit color data? Let that statement sink in. VERA is not photoshop.


Sent from my iPhone using Tapatalk

VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:26 am
by svenvandevelde


6 minutes ago, Lorin Millsap said:






So you want an 8 bit CPU to handle 64 bit color data? Let that statement sink in. VERA is not photoshop.





Sent from my iPhone using Tapatalk



I have let your reply sink in. These kind of aggressive replies are confronting and demotivating to continue with the X16.

I wrote my post wrong. I meant 4 bits, not 16 bits ... I should better go back to sleep. I'll just let it.

 


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:30 am
by Ed Minchau


3 minutes ago, svenvandevelde said:




I have let your reply sink in. These kind of aggressive replies are confronting and demotivating to continue with the X16.



I wrote my post wrong. I meant 4 bits, not 16 bits ... I should better go back to sleep. I'll just let it.



 



I think the best you could do for transparency on VERA would be to make every second pixel on a layer 1 tile or a sprite color 00 in a checkerboard pattern.


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:31 am
by Lorin Millsap
I think the best you could do for transparency on VERA would be to make every second pixel on a layer 1 tile or a sprite color 00 in a checkerboard pattern.

Bingo. Many vintage systems did transparency effects this way and it’s actually a very charming approach.


Sent from my iPhone using Tapatalk

VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 2:42 am
by Wavicle


46 minutes ago, svenvandevelde said:




 



Would it be possible in the future releases of the X16 to patch to the VERA with an RGB + alpha channel in the palette definition matrix? Where VERA would support RGBA. So 16 bits for red, 16 bits for green, 16 bits for blue and 16 bits for transparency?



 



 



I think I might understand what you mean. A slight language barrier perhaps is leading to confusion here. Currently, there are 4 bits or 16 values for each color channel:

image.png.8f97e2201cdd3a8771db60e38a7b04d8.png

Are you proposing to use the most significant 4 bits of the second byte (currently unused) to give 16 levels of alpha?


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 8:31 am
by Ed Minchau

Thinking about this some more, there's a way to have 1/4 transparency, 1/3, 1/2, 2/3 or 3/4 using the VSYNC interrupt.  You could have two, three, even four tiles that all look similar except with different pixels mapped to 00, and alternate between these with every VSYNC, or every second or third one even.  The switch happens too fast for the eye to really register, and instead your mind fills in the gaps and sees it as transparent.

So, for a 50% transparency, you'd have an original tile as a source and then two tiles with those original pixels but every second pixel mapped to 00 in a checkerboard pattern; these two new tiles would have the opposite checker board, so for 1/60 of a second you'd see half the pixels and then for 1/60 of a second you'd see the other half of the pixels, switching back and forth.  Or for a 1/3 or 2/3 transparency you'd have 3 copies of the original with either 1/3 or 2/3 of the pixels mapped to 00, and then switch between the three tiles every 1/60 of a second.


VERA - alpha channel in palette?

Posted: Wed Mar 24, 2021 10:41 am
by BruceMcF


8 hours ago, svenvandevelde said:




Would it be possible in the future releases of the X16 to patch to the VERA with an RGB + alpha channel in the palette definition matrix? Where VERA would support RGBA. So 16 bits for red, 16 bits for green, 16 bits for blue and 16 bits for transparency?



Man, talk about everything old being new again, there was discussion of adding transparency to color back in the Gameduino days.

If it is four level transparency as a persistence of vision illusion rather than a blend transparency, then there could be a two bit counter incremented every vertical back porch, and when the counter is less than the alpha level for a color, the color is treated as transparent.

But if Frank figures it's pretty much done and dusted, then that would be a question for people playing around with things down the track.

And it's more bragging rights for whomever does it by playing games on the VSYNC interrupt (as described above) if THEY generate the illusion rather than having Vera do it automatically.