title: Check if sampler2D is empty
body: <p>I'm designing a sprite class, and I would like to display only a color if no texture is loaded.</p>
  <p>Here are my vertex shader</p>
  <pre><code>#version 330 core
  layout (location = 0) in vec4 vertex; // &lt;vec2 pos, vec2 tex&gt;
  
  out vec2 vs_tex_coords;
  
  uniform mat4 model;
  uniform mat4 projection;
  
  void main()
  {
      vs_tex_coords = vertex.zw;
      gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);
  }
  </code></pre>
  <p>And the fragment shader :</p>
  <pre><code>#version 330 core
  
  in vec2 vs_tex_coords;
  
  out vec4 fs_color;
  
  uniform sampler2D image;
  uniform vec3 sprite_color;
  
  void main()
  {
      fs_color = vec4(sprite_color, 1.0) * texture(image, vs_tex_coords);
  } 
  </code></pre>
  <p>My problem is that if I don't bind a texture, it displays only a black sprite. I think the problem is that the texture function in my fragment shader returns a 0, and screw all the formula.</p>
  <p>Is there a way to know if the sampler2D is not initialized or null, and just return the sprite_color?</p>