title: Implementing Anti-Aliasing (FSAA?) on Android, OpenGL
body: <p>I'm currently using OpenGL on Android to draw set width lines, which work great except for the fact that OpenGL on Android does not natively support the anti-aliasing of such lines. I have done some research, however I'm stuck on how to implement my own AA.</p>
  
  <p><strong>FSAA</strong></p>
  
  <p>The first possible solution I have found is Full Screen Anti-Aliasing. I have read <a href="http://www.opengl.org/resources/code/samples/advanced/advanced97/notes/node63.html" rel="nofollow">this page</a> on the subject but I'm struggling to understand how I could implement it. </p>
  
  <ul>
  <li>First of all, I'm unsure on the entire concept of implementing FSAA here. The article states <em>"One straightforward jittering method is to modify the projection matrix, adding small translations in x and y"</em>. Does this mean I need to be constantly moving the same line extremely quickly, or drawing the same line multiple times?</li>
  <li>Secondly, the article says <em>"To compute a jitter offset in terms of pixels, divide the jitter amount by the dimension of the object coordinate scene, then multiply by the appropriate viewport dimension"</em>. What's the difference between the dimension of the object coordinate scene and the viewport dimension? (I'm using a 800 x 480 resolution)</li>
  </ul>
  
  <p>Now, based on the information given in that article the 'jitter' coordinates should be relatively easy to compute. Based on my assumptions so far, here is what I have come up with (Java)...</p>
  
  <pre><code>float currentX = 50;
  float currentY = 75;
  
  // I'm assuming the "jitter" amount is essentially
  // the amount of anti-aliasing (e.g 2x, 4x and so on)
  int jitterAmount = 2;
  
  // don't know what these two are
  int coordSceneDimensionX;
  int coordSceneDimensionY;
  
  // I assume screen size
  int viewportX = 800;
  int viewportY = 480;
  
  float newX = (jitterAmount/coordSceneDimensionX)/viewportX;
  float newY = (jitterAmount/coordSceneDimensionY)/viewportY;
  
  // and then I don't know what to do with these new coordinates
  </code></pre>
  
  <p>That's as far as I've got with FSAA</p>
  
  <p><strong>Anti-Aliasing with textures</strong></p>
  
  <p>In the same document I was referencing for FSAA, there is also a page that briefly discusses implementing anti-aliasing with the use of textures. However, I don't know what the best way to go about implementing AA in this way would be and whether it would be more efficient than FSAA. </p>
  
  <p>Hopefully someone out there knows a lot more about Anti-Aliasing than I do and can help me achieve this. Much appreciated!</p>