Hello Guest

Author Topic: Dithered 16Bit_No Alpha - what happens to the alpha?  (Read 4960 times)

edb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 43
    • View Profile
Dithered 16Bit_No Alpha - what happens to the alpha?
« on: March 22, 2015, 04:05:49 pm »
I've got Dithered 16Bit_No Alpha as the texture compression on a sprite collection, and as was mentioned in a previous post,
this mode is RGB565, where there are no bits for an alpha channel. 

But check this out - the textures I'm using in that sprite collection do have an alpha channel and the alpha is working - which is awesome to get rgb565 + an alpha channel, but...how is this possible?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Dithered 16Bit_No Alpha - what happens to the alpha?
« Reply #1 on: March 22, 2015, 05:39:20 pm »
Its not, its just writing out the alpha channel as is but the RGB channels are quantised to 565. Its still an 8888 textures as unity doesn't support any other formats. It should probably set the texture format to RGB 16 bit (not RGBA16) but I don't know why it isn't being set. I'll have to look through version control to see if there was any specific reason for this before changing it, but you should set it to that if you want to use it without an alpha channel.

edb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Dithered 16Bit_No Alpha - what happens to the alpha?
« Reply #2 on: March 22, 2015, 07:38:03 pm »
I did a test on the profiler on an Android device - it said the sprite collection with Dithered 16Bit_No Alpha was 2MB.  As a test I changed that sprite Collection to uncompressed - it was 4MB in the profiler. 

So if I'm getting the benefits of half of the memory size of RGBA8888, 565 colors + dithered, AND an alpha channel, then that's awesome! 

Am I missing some negative thing here?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Dithered 16Bit_No Alpha - what happens to the alpha?
« Reply #3 on: March 22, 2015, 10:38:54 pm »
You're not getting that. That is 4444, not 565 + alpha. 565 + alpha doesn't exist.You're better off using 16 bit dithered with alpha.

edb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Dithered 16Bit_No Alpha - what happens to the alpha?
« Reply #4 on: March 23, 2015, 01:40:35 am »
Ok - thanks!