I keep seeing shader code (often related to geometry shaders) posted around the place with varying variables specified with both varying and in / out qualifiers:
varying out float foo;
The specifications (at least 4.0 which I have to hand) don’t say anything about being able to use both in / out and the deprecated varying keyword. They do say “Variable declarations may have one storage qualifier specified in front of the type.” Does “varying out” or “varying in” count as just one storage qualifier?
Varying is replaced with the in and out qualifiers.
It makes for code that is probably more consistent and more portable between vertex and fragment shaders.
An “out” from a vertex shader becomes an “in” to a fragment shader. These are interpolated to fragment values during rasterization and so are implicitly varying. (Flat shading qualifiers aside)
But that’s not the answer to his question. The reason he sees shaders using syntax like “varying out” (which is not legal in 3.0+ core) is because those shaders are using EXT_gpu_shader4, which does use that syntax.
“varying out” has the same semantic meaning as “out” in 3.0+.