Improved Shader and Uniform lifetime and encoding/decoding