Using Integer Varying Variables in GLSL
We now can transfer varying variables between vertex shader and fragment shader in GLSL via 'GL_EXT_gpu_shader4' extension. But there's one thing important should be noticed: integer or unsigned integer(including according vectors and matrix) varying vaiables cannot be interpolated .
If we declare an integer varying variable like this:
We will get a shader program link error.
So we should add a prefix 'flat' before to tell the shader do not interpolate them:
We all know that we can use glShadeModel() to determine the flat color shade or smooth