POV-Ray : Newsgroups : povray.binaries.scene-files : Gamma correction macro Server Time
1 Sep 2024 10:19:07 EDT (-0400)
  Gamma correction macro (Message 1 to 1 of 1)  
From: Bill Hails
Subject: Gamma correction macro
Date: 24 Jun 2006 08:42:27
Message: <449d3333@news.povray.org>
Just something I use to brighten and darken sampled pigments
without changing their colour:

Gamma(Colour, Correction)

In the past I've tried lots of variations on things like
"White - (1 - Colour) / WhitenAmount" with limited success.

The Gamma() macro has the nice feature that if the input
colour has all components somewhere between 0 and 1 then
so will the output colour.

Since I'm using it all over the place others
might find it useful too.

P.S.
I've added f, t and ft variants for the sake of completeness
but I don't use those and I'm not sure how useful they might
be.

-- 
Bill Hails
http://billhails.net/


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.