title: Smooth textured line with OpenGL ES 2.0 shaders
body: <p>We have an iOS drawing app. Currently, the drawing is implemented with OpenGL ES 1.1. We use some algorithms to smooth the lines such as Bezier curves. So, when touch events occur, we get some set of points out of touch event points (based on algorithms) and draw these points. We also use brush texture for points to have more natural look.</p>
  
  <p>I wonder if it's possible to implement these algorithms in OpenGL ES 2.0 shaders. Something like to call an OpenGL function to draw lines made of touch points and on output have smoothed brush-textured curve rendered.</p>
  
  <p><img src="https://i.stack.imgur.com/GqaU5.gif" alt="enter image description here"></p>
  
  <p>Points P0, P1, ... P4 here are touch events and the points on red curve - output points, with such step for T so that the distance between two neighbor points on curve is not greater than 1 pixel.</p>
  
  <p>And here is the link with Bezier algorithm explanation:
  <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve" rel="noreferrer">Bézier curve - Wikipedia, the free encyclopedia</a></p>
  
  <p>Any help is much appreciated.
  Thanks.</p>