requires the word "compatibility" so the line looks like...
#version 420 compatibility
...this is supposed to help with running some legacy glsl code, I don't have a list of issues or AMD 7000 series card to test
here is a tutorial about using
in and
out http://www.lighthouse3d.com/tutorials/glsl-tutorial/color-example/EDIT:
Varying variables provide an interface between Vertex and Fragment Shader. I think this is where the 7000 series has a problem, requiring 2 discrete variables to do the same thing.
my nVidia card reports...
Fragment shader compiled with warnings: Fragment info
-------------
0(256) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(257) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(258) : warning C7555: 'varying' is deprecated, use 'in/out' instead
...
but only warnings, no errors, it compiles and runs the shader with no visible difference.