// Persistence of Vision Ray Tracer Scene Description File // Vers: 3.5 // File: $Id: Gamma.inc,v 1.3 2006/06/24 12:25:38 billh Exp $ // Desc: $Log: Gamma.inc,v $ // Desc: Revision 1.3 2006/06/24 12:25:38 billh // Desc: added filter and transmit variants // Desc: // Desc: Revision 1.2 2006/06/24 11:51:39 billh // Desc: added brief documentation // Desc: // Desc: Revision 1.1 2006/06/02 21:11:57 billh // Desc: Gamma macro for individual colours // Desc: // Date: $Date: 2006/06/24 12:25:38 $ // Auth: $Author: billh $ // // use Gamma(Colour, GammaCorrection) // // GammaCorrection // 0 - black // <1 - darker // 1 - the original colour // >1 - brighter #ifndef (GAMMA_INCLUDED) #declare GAMMA_INCLUDED = version; #macro Gamma(C, G) rgb< pow(C.red, 1/G), pow(C.green, 1/G), pow(C.blue, 1/G) > #end #macro GammaF(C, G) rgbf< pow(C.red, 1/G), pow(C.green, 1/G), pow(C.blue, 1/G), pow(C.filter, 1/G) > #end #macro GammaT(C, G) rgbt< pow(C.red, 1/G), pow(C.green, 1/G), pow(C.blue, 1/G), pow(C.transmit, 1/G) > #end #macro GammaFT(C, G) rgbft< pow(C.red, 1/G), pow(C.green, 1/G), pow(C.blue, 1/G), pow(C.filter, 1/G), pow(C.transmit, 1/G) > #end #version GAMMA_INCLUDED; #end