Make an FXAA function for C language code that follows these guidelines:
1. The FXAA algorithm takes as input the rendered image and optionally the luminance data.
2. Luminance data can be passed to the FXAA algorithm from the rendering step as an alpha channel embedded in the image to be antialiased, calculated from the rendered image or approximated using the green channel as luminance data.
3. The FXAA algorithm finds high contrast pixels using a high-pass filter that uses luminance data.
4. Low contrast pixels found are excluded from being further altered by FXAA.
5. The high-pass filter that excludes low contrast pixels can be adjusted to balance speed and sensitivity.
6. The FXAA algorithm uses the contrast between adjacent pixels to heuristically find edges and determine if edges are in horizontal or vertical directions.
7. The blending direction of a pixel will be perpendicular to the edge direction detected at that pixel.
8. A blending factor is calculated for a high contrast pixel by analyzing luminance data in the 3x3 grid of pixels with the pixel in question being the central pixel.
9. The FXAA algorithm searches along the detected edge to determine how long that edge goes and in which direction the actual edge goes when the detected horizontal or vertical edge ends, in order to take into account the actual edge direction when calculating a second blending factor.
10. This step can be adjusted for more quality by increasing the resolution of the search and how far the search goes before searching fo