Cycle material output tuning not working


I have a cycles node based material which basically consists of normal map texture + color, however i want to tune the final output for that material - play with contrast/brightness, rgb curves etc right after normal map and diffuse color has been combined.

However as soon as I plug in RGBcurves or any other non-shader node right between material output and shader node - it gives a black output.

How to workaround this? Thank you

The only thing that is allowed to feed into the material output is a shader node. So, you either have to tweak contrast, saturation etc. on the texture level (before feeding the texture into the shader) or in post production.