refactoring to allow return of mat4 from gpu.main
gpu backend: fixed return array of mat4.