title: GLSL equivalent of HLSL clip()?
body: <p>The HLSL <code>clip()</code> function is described <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb204826%28v=vs.85%29.aspx" rel="noreferrer">here</a>.</p>
  
  <p>I intend to use this for alpha cutoff, in OpenGL. Would the equivalent in GLSL simply be</p>
  
  <pre><code>if (gl_FragColor.a &lt; cutoff)
  {
      discard;
  }
  </code></pre>
  
  <p>Or is there some more efficient equivalent?</p>