I’m creating a particle system that runs entirely in shaders using two pairs of ping-ponged textures to store velocity and position data. (Basically the gpuParticleSystem example, except written in GLSL 1.5). Each “particle” is connected to and attracted to a fixed-position “root” by a line, so the effect is more like a field of grass in the wind rather than a bunch of free-floating points.
All of the above is working fine. My problem is that since I am drawing straight lines between two vertices, I get pretty noticeable aliasing as they move around. As I understand it, because I am using custom shaders instead of the normal OF drawing pipeline, I have to implement the anti aliasing in my shader (I can’t just use ofEnableSmoothing() for example).
I’m looking for an example/addon to point me in the right direction. Based on my research, I think fxaa is the best approach since I can add it to end of everything that’s already going on, although I’m open to suggestions. I found Neil Mendoza’s awesome ofxPostProcessing addon, which has an fxaa module, but it’s all GLSL 1.2 and uses a lot of texture functions that have been deprecated in 1.5. Before I dive in and start trying to write my own, I just wanted to get some wisdom from the community.
Thanks!