Compatibility
In order for a given vertex shader and
fragment shader to be used in a
program, the set of
inputs I of the
fragment shader must be compatible with the set of
outputs
O of
the vertex shader. Specifically, for each
0 <= s <= |I| - 1, there must be some
0 <= t <= |O| - 1 such that
the name and
type of
Iₛ matches that of
Oₜ:
The set of parameters
P of the given
given vertex shader, and the set of
parameters
Q of the given
fragment shader must be type-compatible if they
share any of the same names. That is, for each
0 <= s <= |P| - 1,
if there is some
0 <= t <= |Q| - 1 such that
the name of Pₛ equals
that of Qₜ, then the
type of Pₛ must equal
that of Qₜ.