|
![](/i/fill.gif) |
Kari Kivisalo wrote:
>
> #macro G(Color)
> #local DisplayGamma=2.2; //Display_Gamma from povray.ini
> #local Gamma=DisplayGamma/AG;
> <pow(Color.x,Gamma),pow(Color.y,Gamma),pow(Color.z,Gamma)>
> #end
Here is a demo that shows how G() preserves colors when assumed_gamma
is used. Without G() gamma correction is applied twice to the colors
so they loose saturation and contrast.
http://www.pp.htv.fi/kkivisal/gamma_colors.jpg
When you design a cool color layout in an image editor the colors
you are viewing are gamma corrected. When assumed_gamma (1) is
present povray applies gamma correction to the whole image and
also to your carefully selected colors (which were already corrected).
G() macro applies inverse correction which cancels the povray gamma
correction. Or, as I like to say, converts a color to linear space :)
_____________
Kari Kivisalo
Post a reply to this message
|
![](/i/fill.gif) |