Home Technical Talk

Is it possible for 2 textures to be in the same channel

spider2544
polycounter lvl 11
Offline / Send Message
spider2544 polycounter lvl 11
Im wonder if its possible to have some kind of texture compression where say for example a 1bit alpha could be stored in the red channel as well as a grey scale texture. maybe by compressing the grey scale to only use the first 128 range of value out of the red channel and then another texture could be compressed into the remaining data thats left over.
that means that the greyscale texture would get dithered a bit, but the one bit alpha would essentaily remain the same.

 could that go beyond a 1 bit alpha and maybe get something like 16 levels of black grey and white?

Replies

  • ZacD
    Offline / Send Message
    ZacD ngon master
    I think City Skylines uses anything above 200 brightness as a mask for it's mirror/glass/windows reflection material, it's definitely possible to clamp certain ranges of textures for different uses, I wouldn't be surprised if white and black values were used to mask opacity. 
  • JustMeSR
    Offline / Send Message
    JustMeSR polycounter lvl 4
    Yup, just clamp the area you want to use to extract from texture.

    To combine 2 images you multiply by 0.5 both images and add 0.5 to 1 of them. Then to extract you clamp base texture with min 0 and max 0.5 to get 1st map and min 0.5, max 1 to get 2nd map. You can also multiply by 2 to get them back to their original range (0 to 1) [Some information will be lost during merging maps into 1 image though.].
Sign In or Register to comment.