Original Post
I'm working on an android app and I'm targeting OpenGL ES 2 only. I want to draw grid lines around quads and I'm currently compiling them as a VBO and drawing them after I draw the quad itself. It currently looks like this:

Now as you can see the grid lines aren't entirely symmetrical with respect to the quad itself. Neither is the fade-out I'm applying in the shader. I know I could fix this with a bit of math when I'm calculating the grid line VBO and applying a translation to the center-point used to calculate the fade, but that won't work when I start varying the size of the quads itself. Is there a simpler way to draw the grid lines than what I've come up with? I just want them to show up surrounding the quad and with a bit of a fade off that I can adjust no matter whether the quad is 1 unit or 3 units on a side or whatever. I've considered using a texture that looks like the grid lines but I don't think that'll work because of aliasing as I zoom out.

Now as you can see the grid lines aren't entirely symmetrical with respect to the quad itself. Neither is the fade-out I'm applying in the shader. I know I could fix this with a bit of math when I'm calculating the grid line VBO and applying a translation to the center-point used to calculate the fade, but that won't work when I start varying the size of the quads itself. Is there a simpler way to draw the grid lines than what I've come up with? I just want them to show up surrounding the quad and with a bit of a fade off that I can adjust no matter whether the quad is 1 unit or 3 units on a side or whatever. I've considered using a texture that looks like the grid lines but I don't think that'll work because of aliasing as I zoom out.
