Creating Color Scopes in Unity.

I want to create a UI element that contains color scopes in unity (visualize the color intenseties).
Like this:

  • I need to sample the color output of the camera (including any postFX shaders attached to the camera, so if i apply a LUT Color correction the scope will change)
  • Other UI elements must not be sampled.

I assume that the best way to do this would be to create a sprite with a custom material, that i write to in runtime. But how do i go about sampling the camera+postFX without also sampling the other UI elements?

I found out that using a secondary camera and tunneling it through a render texture i was able to get the UI and the post effects on a seperate layer.