Shader for for modifying image contrast by interpolation and extrapolation