Split up ApplyShader into ApplyVertexShader and ApplyFragmentShader.

Will allow the alphatest avoiding optimization later.
Fix the latest fog issue for software transform as well