 vec4 Pow(vec4 x, vec4 y) { POW }
 
 ///////////////////////////////////////////////////////////////////////////////
+// Constrast adjustment.
+///////////////////////////////////////////////////////////////////////////////
+
+vec3 AdjustContrast(vec3 Color, vec2 ScaleBias)
+{
+    return (Color - ScaleBias.y) * ScaleBias.x + ScaleBias.y;
+}
+
+///////////////////////////////////////////////////////////////////////////////
 // The brushed-metal normal computation.
 ///////////////////////////////////////////////////////////////////////////////
 

    float G  = min(1.0, max(0.0, min(G1, G2)));

    // Compute the fresnel term
    float F  = Reflectance + (1.0 - Reflectance) * pow(1.0 - NormalDotView, 5.0);

    // Compute the roughness term
    float R_2     = Roughness * Roughness;

uniform sampler2D DiffuseMap;
uniform sampler2D NormalMap;
uniform sampler3D NoiseMap;
uniform samplerCube EnvMap;

// Data from vertex shader
varying vec3 Position;
