~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to extern/qdune/shaders/fog.sqd

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Original source:
2
 
# volume fog(float distance = 1;
3
 
#            color background = color(0.5, 0.5, 0.5);)
4
 
# {
5
 
#       float d = 1 - exp(-length(I)/distance);
6
 
#       Ci = mix(Ci, background, d);
7
 
#       Oi = mix(Oi, color(1, 1, 1), d);
8
 
# }
9
 
volume fog
10
 
param float distance 1
11
 
param color background 0.5 0.5 0.5
12
 
temp float d
13
 
temp float $1
14
 
const color $2 1 1 1
15
 
global I Ci Oi
16
 
codesegment
17
 
        length          $1 I
18
 
        negff                   $1 $1
19
 
        divfff          $1 $1 distance
20
 
        exp                             $1 $1
21
 
        subfff          d 1 $1
22
 
        mixv                    Ci Ci background d
23
 
        mixv                    Oi Oi $2 d
24
 
        return