Can I do custom post processing using C++ (to use procedural algorithms)

Can I do custom post processing using C++, not shader language like GLSL?

Or can I use shader language to implement procedural algorithms?

I don’t have specific need for such thing but I think it would fun to do complex things on post processing by applying procedural algorithms(any algorithms) to make final render result.

Example of procedural algorithm: for chaotic function f(a, b), calculate each pixel’s color as: NewColor_0 = Color_0, NewColor_x = f(NewColor_(x-1), Color_x). (Simplified to one dimension for simplicity)