Toshihiro Shimizu 890ddd
#ifdef GL_ES
Toshihiro Shimizu 890ddd
precision mediump float;
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
uniform vec4 infiniteRect;
Toshihiro Shimizu 890ddd
uniform vec4 inputBBox[1];
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
varying vec4 outputBBox;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
uniform float radius;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void main( void )
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
  if(inputBBox[0] == infiniteRect)                    // Better avoid enlarging the infinite 
Toshihiro Shimizu 890ddd
    outputBBox = infiniteRect;                        // rect...
Toshihiro Shimizu 890ddd
  else
Toshihiro Shimizu 890ddd
    outputBBox = vec4(
Toshihiro Shimizu 890ddd
      inputBBox[0].x - radius,
Toshihiro Shimizu 890ddd
      inputBBox[0].y - radius,
Toshihiro Shimizu 890ddd
      inputBBox[0].z + radius,
Toshihiro Shimizu 890ddd
      inputBBox[0].w + radius);
Toshihiro Shimizu 890ddd
  
Toshihiro Shimizu 890ddd
  gl_Position = vec4(0.0);                            // Does not link without
Toshihiro Shimizu 890ddd
}