Hi!
At first, look at screens from my game project, where I'm using gammaramp.dll: SCREENSHOTS
To KoH request (sepia effect).
In Photoshop, sepia can be done with two methods:
  • 1) desaturate, add colorized adjustment layer
  • 2) with channel mixer

You can do sepia effect with post-process shader applied for whole rendered view, that calculate RGB by formula (2-nd method):

R=1.3*R+1.68*G+1.08*B+0.08
G=1.24*R+1.74*G+1.08*B+0.04
B=1.24*R+1.68*G+1.14*B-0.02

Try to talk on shaders thread about it with shaders gurus.
Or You can drop colors in all level entities for b&w view and apply gamma correction over it (1-st method).
Quick and dirty example for pseudo-sepia with this dll:
Code:

...
gr_red[i] = min(65535.0, pow(i/256.0, 1/br_gamma)*65536+10000.0);
gr_green[i] = pow(i/256.0, 1/br_gamma)*65536;
gr_blue[i] = max(0.0, pow(i/256.0, 1/br_gamma)*65536-10000.0);
...


Some examples to let you start.

more bluish (night/frosted view):
Code:

...
gr_red[i] = pow(i/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(i/256.0, 1/br_gamma)*65536;
gr_blue[i] = min(65535.0, pow(i/256.0, 1/br_gamma)*65536*2);
...


or mute blue colors:
Code:

...
gr_red[i] = pow(i/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(i/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(i/256.0, 1/br_gamma)*10000;
...


or some color quantizing (not optimized for clarify idea):
Code:

...
if(i<32){
gr_red[i] = pow(32/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(32/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(32/256.0, 1/br_gamma)*65536;
}else{
if(i<64){
gr_red[i] = pow(64/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(64/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(64/256.0, 1/br_gamma)*65536;
}else{
if(i<96){
gr_red[i] = pow(96/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(96/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(96/256.0, 1/br_gamma)*65536;
}else{
if(i<128){
gr_red[i] = pow(128/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(128/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(128/256.0, 1/br_gamma)*65536;
}else{
if(i<160){
gr_red[i] = pow(160/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(160/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(160/256.0, 1/br_gamma)*65536;
}else{
if(i<192){
gr_red[i] = pow(192/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(192/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(192/256.0, 1/br_gamma)*65536;
}else{
if(i<224){
gr_red[i] = pow(224/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(224/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(224/256.0, 1/br_gamma)*65536;
}else{
if(i<256){
gr_red[i] = pow(256/256.0, 1/br_gamma)*65536;
gr_green[i] = pow(256/256.0, 1/br_gamma)*65536;
gr_blue[i] = pow(256/256.0, 1/br_gamma)*65536;
}}}}}}}}
...


If you apply special skins for models and do some manipulations with gamma ramp, you can do 'natural' night goggles, for example.
You can shift gamma levels dynamically, using time, for interesting effects. And so on...

And at end I proudly present the Micro$oft Help
Quote:


Gamma controls allow you to change how the system displays the contents of the surface, without affecting the contents of the surface itself. Think of these controls as very simple filters that Microsoft® Direct3D® applies to data as it leaves a surface and before it is rendered on the screen.
Gamma controls are a property of a swap chain. Gamma controls make it possible to dynamically change how a surface's red, green, and blue levels map to the actual levels that the system displays. By setting gamma levels, you can cause the user's screen to flash colors—red when the user's character is shot, green when the character picks up a new item, and so on—without copying new images to the frame buffer to achieve the effect. Or, you might adjust color levels to apply a color bias to the images in the back buffer.
...
In Direct3D, the term gamma ramp describes a set of values that map the level of a particular color component—red, green, blue—for all pixels in the frame buffer to new levels that are received by the DAC for display. The remapping is performed by way of three look-up tables, one for each color component.
Here's how it works: Direct3D takes a pixel from the frame buffer and evaluates its individual red, green, and blue color components. Each component is represented by a value from 0 to 65535. Direct3D takes the original value and uses it to index a 256-element array (the ramp), where each element contains a value that replaces the original one. Direct3D performs this look-up and replace process for each color component of each pixel in the frame buffer, thereby changing the final colors for all the on-screen pixels.
It's handy to visualize the ramp values by graphing them. The first graph of the two following graphs shows a ramp that doesn't modify colors at all. The second graph shows a ramp that imposes a negative bias to the color component to which it is applied.

Output color level
65535
|            *
|
|         *
|
|      *
|
|  *
|________ 65535
Input color level

Output color level
65535
|
|
|
|
|                 *
|         *
|  *
|___________ 65535
Input color level

The array elements for the graph on the left contain values identical to their index—0 in the element at index 0, and 65535 at index 255. This type of ramp is the default, as it doesn't change the input values before they're displayed. The right graph provides more variation; its ramp contains values that range from 0 in the first element to 32768 in the last element, with values ranging uniformly in between. The effect is that the color component that uses this ramp appears muted on the display. You are not limited to using linear graphs; if your application can assign arbitrary mapping if needed. You can even set the entries to all zeroes to remove a color component completely from the display. (if You do this to all RGB, You have nothing - pure black screen Lion Ts)




As you can see, gammaramp.dll is good for quick color effects or 'brightness control’, which theoretically causes no frame rate drop:
Quote:


...By setting gamma levels, you can cause the user's screen to flash colors...without copying new images to the frame buffer to achieve the effect...




That’s all.