Fix lots of bug and WIP on the shader.