When
programming shaders,
when does one use uniform
vs in?
uniform
is
used for variables that are sent from the client (C++ program) to the GPU. Uniform variables are “visible”
in
all shaders (i.e.,
vertex, fragment) that are part of the shader program
Example:
Variables
that are
in are typically those coming from
another shader stage.
Example:
