title: Texture splatting more than 5 textures
body: <p>I'm looking for a solution to store more than 5 diffrent texture in one chunk of a terrain and I've found part of this solution only. I have to pack all my textures (512x512) into one big texture (8192x8192) then in shader I have to calculate texture id using r,g,b values from splat texture. But how to calculate this id from r,g,b values. What is a formula?
  <a href="https://i.stack.imgur.com/Nzjzk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nzjzk.png" alt="enter image description here"></a></p>