VERA - alpha channel in palette?

Chat about anything CX16 related that doesn't fit elsewhere
User avatar
svenvandevelde
Posts: 488
Joined: Wed Dec 23, 2020 6:30 am
Location: Belgium, Antwerpen

VERA - alpha channel in palette?

Post 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?

 

 

KICKC home page by Jesper Gravgaard.
My KICKC alpha with Commander X16 extensions.
Elektron72
Posts: 137
Joined: Tue Jun 30, 2020 3:47 pm

VERA - alpha channel in palette?

Post 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.

User avatar
svenvandevelde
Posts: 488
Joined: Wed Dec 23, 2020 6:30 am
Location: Belgium, Antwerpen

VERA - alpha channel in palette?

Post 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 ...

KICKC home page by Jesper Gravgaard.
My KICKC alpha with Commander X16 extensions.
Lorin Millsap
Posts: 193
Joined: Wed Apr 29, 2020 6:46 pm

VERA - alpha channel in palette?

Post 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
User avatar
svenvandevelde
Posts: 488
Joined: Wed Dec 23, 2020 6:30 am
Location: Belgium, Antwerpen

VERA - alpha channel in palette?

Post 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.

 

KICKC home page by Jesper Gravgaard.
My KICKC alpha with Commander X16 extensions.
Ed Minchau
Posts: 503
Joined: Sat Jul 11, 2020 3:30 pm

VERA - alpha channel in palette?

Post 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.

Lorin Millsap
Posts: 193
Joined: Wed Apr 29, 2020 6:46 pm

VERA - alpha channel in palette?

Post 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
Wavicle
Posts: 285
Joined: Sun Feb 21, 2021 2:40 am

VERA - alpha channel in palette?

Post 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?

Ed Minchau
Posts: 503
Joined: Sat Jul 11, 2020 3:30 pm

VERA - alpha channel in palette?

Post 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.

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

VERA - alpha channel in palette?

Post 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.

Post Reply