As part of this, also do some shader code clean up, and consider not using acos in the shader
As part of this, also do some shader code clean up, and consider not using acos in the shader