title: OpenGL uniform block works in vertex shader only if defined in fragment shader. Separable shader programs
body: <p>I have a UBO defined in my vertex shader as follows:</p>
  
  <pre><code>layout (std140) uniform matricesBuffer
  {
      mat4 MVPMatrix;
      mat4 modelMatrix;
  };
  </code></pre>
  
  <p>I spent ages figuring out why the matrix I needed wasn't getting through. Then I added the same uniform block to the fragment shader, and it magically worked. So my question is, I know there are specifications about interface matching between shader programs/stages when using separable shaders in a pipeline, but from what I've read these only describe the in and out variables, but this uniform block, or UBO it is, should be accessible from just the vertex shader, as I linked the UBO to that binding point. I'm confused about this, any info would be appreciated. </p>
  
  <p>Edit: I've been trying some things, putting just:</p>
  
  <pre><code>layout (std140) uniform anyName
  {
      mat4 worldMatrix;
  };
  </code></pre>
  
  <p>in the fragment shader makes it work. And if I change "anyName" to certain names it either works or doesn't. For example if it starts with the letter R it doesn't work, then most other letters it works. So confused.</p>