Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
35 chris 1
!!ARBfp1.0
2
OPTION ARB_precision_hint_fastest;
3
 
4
 
5
# Purpose:
6
 
7
 
8
# Input Parameters:
9
# Tex 0: Frame buffer texture
10
# TexCoord 0: Texel in the frame buffer
11
# Env 0: Intensity of the effect.
12
#	  x: Intensity.
13
# Env 1: Blur size.
14
#	  x: Blur size in x direction.
15
#	  y: Blur size in y direction.
16
#	  z: 0.0
17
#	  w: 1.0
18
# Env 2: Negative blur size.
19
#	  x: -Blur size in x direction.
20
#	  y: -Blur size in y direction.
21
#	  z: 0.0
22
#	  w: 1.0
23
 
24
 
25
TEMP texel0, texel1, texel2, texel3, texel4, finalcolor;
26
 
27
TEMP lookup;
28
 
29
# Make multiple texel lookups
30
TEX texel0, fragment.texcoord[0], texture[0], 2D;
31
ADD lookup, fragment.texcoord[0], program.env[1];
32
TEX texel1, lookup, texture[0], 2D;
33
ADD lookup, fragment.texcoord[0], program.env[2];
34
TEX texel2, lookup, texture[0], 2D;
35
MAD lookup, program.env[1], {2.0, 2.0, 1.0, 1.0}, fragment.texcoord[0];
36
TEX texel3, lookup, texture[0], 2D;
37
MAD lookup, program.env[2], {2.0, 2.0, 1.0, 1.0}, fragment.texcoord[0];
38
TEX texel4, lookup, texture[0], 2D;
39
 
40
# Mix texel lookups.
41
MUL finalcolor, texel0, 0.3;
42
MAD finalcolor, texel1, 0.2, finalcolor;
43
MAD finalcolor, texel2, 0.2, finalcolor;
44
MAD finalcolor, texel3, 0.15, finalcolor;
45
MAD finalcolor, texel4, 0.15, finalcolor;
46
 
47
MOV result.color.rgb, finalcolor;
48
MOV result.color.a, program.env[0].x;
49
 
50
END