Search code examples
iosobjective-ccameragpuimage

GPU Image Framework X-ray Effect


enter image description hereI am making a application that you can apply different effects to photos using GPU Image Framework by Brad Larson.I want to add X-ray Effect filter in GPU image app.Any pointers will be appreciated


Solution

  • You want something like the GPUImageColorInvertFilter:

    Color invert filter

    If that doesn't produce the exact effect you want, you could create a custom filter based on it and have your fragment shader first convert to luminance, and then apply a greenish tint based on the inverse of the pixel's luminance. That would provide the exact effect you show above.

    I'll leave the coding of such a shader as an exercise for the reader.