Try the following:
function aa_test() { renderer.setSize(4, 4); var ortho_camera = new THREE.OrthographicCamera(0, 4, 0, 4, 0, 1 ); var output = new Uint8Array( 4 ); var material = new THREE.LineBasicMaterial({ color: 0xffffff }); var geometry = new THREE.Geometry(); geometry.vertices.push(new THREE.Vector3(0, 0, 0)); geometry.vertices.push(new THREE.Vector3(4, 4, 0)); var line = new THREE.Line(geometry, material); renderer.clearTarget( aa_target.renderTarget, true, true, true ); renderer.context.lineWidth(4); aa_target.add(line); renderer.render( aa_target, ortho_camera, aa_target.renderTarget ); renderer.context.readPixels( 0, 2, 1, 1, renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, output ); if (output[0] == 0) aa_available = false; }
So what you have is an AA accessibility test. This method works in Three.js. I tried to browse Chrome and its special pages (chrome: // gpu, etc.), but getting this data into an arbitrary js script is not possible.
Using FXAA is not so bad. SO LONG since the line thickness is about 1.6. Otherwise, you will not get a sufficient line for mixing. FXAA is great for scenes that go through a lot, but if the scene is mostly lines, then it tends to fade lines too much in the background.
The best answer for this would be FXAA and using the approach here:
https://github.com/OpenGLInsights/OpenGLInsightsCode/tree/master/Chapter%2011%20Antialiased%20Volumetric%20Lines%20Using%20Shader-Based%20Extrusion
this uses the yes geometric shader, but earlier he mentioned using the vertex shader to get the same result. This is likely to give much more pleasant lines.
Hope this helps !: D