Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Packing multiple maps in to single channel

Discussion in 'Shaders' started by exltus, Nov 26, 2020.

  1. exltus

    exltus

    Joined:
    Oct 10, 2015
    Posts:
    58
    Recently I found talk about destiny and how they are optimizing their game. Most interesting part is about packing multiple textures (AO and emisive) in to single texture channel. Unfortunatly there is no explanation how they read this value in shader. Have anyone clue how they do it?

    Here is concrete slide
    destiny.png

    and here is whole presentation https://www.gdcvault.com/play/1025382/Translating-Art-into-Technology-Physically
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    There’s lots of ways to pack data into a single channel, but I believe in this case it’s a lot more straightforward. You never want a value to have both emission and AO, so they just map that channel such that if the value is < 0.5, it’s AO. If it’s > 0.5 it’s emission. It’s only ever one or the other.
     
  3. exltus

    exltus

    Joined:
    Oct 10, 2015
    Posts:
    58
    Ok, thanks. I tried to google solutions how to pack multiple textures to one channel but I did not found any :( Can you please give me link to some resources to learn from?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238