~ubuntu-branches/ubuntu/quantal/aqsis/quantal

« back to all changes in this revision

Viewing changes to shaders/imager/exposure.sl

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-08-06 04:53:26 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806045326-z6xeaaao62idxcc6
Tags: 1.6.0-0ubuntu1
* New upstream release
* debian/control:
  - changed name of lib package to libaqsis1 instead of aqsis-libsc2a
  - changed name of dev package to libaqsis-dev instead of aqsis-libs-dev
  - Added aqsis-data package
  - Revised summary text according to that specified by the RISpec (Pixar)
* Moved examples installation from aqsis.install to aqsis-data.install
* debian/rules: 
  - added content to binary-indep target
* debian/rules: added explicit name of mime file to force dh_installmime
  to generate postinst and prerm scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* 
 
3
 *
 
4
 * Imager shaders change the value of Ci and Oi. The exposure and 
 
5
 * quantization proces specified in thesection on Displays
 
6
 * 
 
7
 *
 
8
 */
 
9
imager
 
10
exposure( float gain=1.0, gamma=1.0, one = 255, min = 0, max = 255 )
 
11
 
12
 
 
13
color gaincolor = Ci * gain;
 
14
 
 
15
#if defined(AQSIS) || defined(DELIGHT) || defined(BMRT)
 
16
        setcomp(Ci,  comp(Ci, 0) + pow( comp(gaincolor, 0), 1.0/gamma ), 0);
 
17
        setcomp(Ci,  comp(Ci, 1) + pow( comp(gaincolor, 1), 1.0/gamma ), 1);
 
18
        setcomp(Ci,  comp(Ci, 2) + pow( comp(gaincolor, 2), 1.0/gamma ), 2);
 
19
#else
 
20
        Ci += pow( gain * Ci , 1.0/gamma );
 
21
#endif
 
22
 
 
23
        setcomp(Ci , clamp( floor( one * comp(Ci, 0) ), min, max ), 0);
 
24
        setcomp(Ci , clamp( floor( one * comp(Ci, 1) ), min, max ), 1);
 
25
        setcomp(Ci , clamp( floor( one * comp(Ci, 2) ), min, max ), 2);
 
26
 
 
27
        setcomp(Oi , clamp( floor( one * comp(Oi, 0) ), min, max ), 0);
 
28
        setcomp(Oi , clamp( floor( one * comp(Oi, 1) ), min, max ), 1);
 
29
        setcomp(Oi , clamp( floor( one * comp(Oi, 2) ), min, max ), 2);
 
30
 
 
31
}