<<< Texture sampling in GLSL | Index | Texture binding, revisited >>> |
Unlike other normal basic types in GLSL,
the sampler can only declared at the global scope as uniform (cannot be a local variable)
the sampler cannot have a value; cannot be used in any arithmetic expressions
the only use of the sampler type is as parameter to a function:
User-defined functions can take sampler as a parameter
A number of built-in functions take samplers as parameters.
<<< Texture sampling in GLSL | Index | Texture binding, revisited >>> |