~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to cont/base/springcontent/shaders/ARB/units3o.fp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!!ARBfp1.0
 
2
# S3O model rendering without shadows
 
3
OPTION ARB_fog_linear;
 
4
 
 
5
TEMP temp,reflect,texColor,extraColor,specular;
 
6
TEMP tempColor,shadeColor;
 
7
 
 
8
#get unit texture
 
9
TEX texColor, fragment.texcoord[1], texture[0], 2D;
 
10
TEX extraColor, fragment.texcoord[1], texture[1], 2D;
 
11
 
 
12
#normalize surface normal
 
13
DP3 temp.x, fragment.texcoord[2], fragment.texcoord[2];
 
14
RSQ temp.x, temp.x;
 
15
MUL temp, fragment.texcoord[2], temp.x;
 
16
 
 
17
#calc reflection dir
 
18
DP3 reflect.x, temp, fragment.texcoord[3];
 
19
MUL reflect.x, reflect.x,{-2};
 
20
MAD reflect, temp, reflect.x, fragment.texcoord[3];
 
21
 
 
22
#get specular highlight and remove if in shadow
 
23
TEX specular, reflect, texture[4], CUBE;
 
24
MUL specular, specular, {4,4,4,1};
 
25
MUL specular, specular, extraColor.y;
 
26
 
 
27
TEX reflect, reflect, texture[3], CUBE;
 
28
LRP shadeColor, extraColor.y, reflect, fragment.color;
 
29
LRP texColor, texColor.w, program.env[14], texColor;
 
30
ADD shadeColor, shadeColor, extraColor.x;
 
31
 
 
32
MAD result.color, texColor, shadeColor, specular;
 
33
MUL result.color.w, extraColor.w, program.env[14].w;
 
34
END
 
 
b'\\ No newline at end of file'