After some time looking or it on the internet I can't find the proper answer to my concern.
I'm currently generating 3D textures on a shader for my planets to avoid sphere mapping issues (pole, distortion, ...).
It works great however I'm limited due to algorithm complexity so I'd like to generate my 3D textures on the CPU side. However a fully furnished 3D texture is heavy like crazy (3 dimension remember) so I'd want to store a 3D result in a 2D texture.
I need to find the correct transformation from 3D coordinates to 2D storage. Anyone have a clever thought ?
Edit : not looking for Sphere cube Map, Octohedron or similar, several texture (like in EveOnline).
I'm looking for something that you have in 3D modelers where you can unwrap a sphere on a flat surface (not regularly).
Typically the picture on the bottom:
With a function
vec2 map(vec3) which can map a 3D texture and retrieve the correct value on the sphere surface.