Skip to main content
1 of 2
Publius
  • 1.5k
  • 2
  • 16
  • 23

in/out keywords in GLSL

I don't really understand how to use the in / out keywords in GLSL, and google is being uncharacteristically unhelpful.

What exactly do they do? How would I use them if, for example, I want to pass a varying variable set per vertex to the fragment shader?

Literally every tutorial I find uses the varying / attribute keywords and that's not helpful.

Publius
  • 1.5k
  • 2
  • 16
  • 23