I'm looking for an efficient way to store datas in a texture instead of using uniforms. The goal is to store bones matrices in a texture. I'm currently doing like this :
- one RGBA pixel = one float
- (128, 255, 32, 14) = 0.128 255 032 014
It works and it's much faster than passing vars through uniforms. Still, I think it's a lot of calculations to do such a little thing.
So do you know a better way to construct a float from RGBA pixel? Is there a built-in way to construct a 4*4 matrix from several RGBA pixels?
Here's the answer thanks to LJ. Didn't tried it yet, but that's the exact same problem.