Fix a couple bugs in the fragment shader OSX caught.
Windows was much more forgiving.