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
# TexCoord 1: Texel in the distortion lookup buffer.
12
# Env 0: Intensity of the effect.
13
#	  x: Intensity.
14
# Env 1: Lookup offset.
15
#	  x: X offset.
16
#	  y: Y offset.
17
#	  z: 0.0
18
#	  w: 0.0
19
# Env 2: Distortion size.
20
#	  x: size.
21
#	  y: size / 2.
22
 
23
 
24
TEMP framebuffer, distortion, finalcolor;
25
 
26
TEMP lookup;
27
 
28
MUL lookup, fragment.texcoord[1], 0.2;
29
ADD lookup, lookup, program.env[1];
30
 
31
# Make a lookup in the distortion buffer.
32
TEX distortion, lookup, texture[1], 2D;
33
 
34
TEMP distortedlookup;
35
MAD distortedlookup, distortion, program.env[2].x, -program.env[2].y;
36
MOV distortedlookup.zw, {0.0, 0.0, 0.0, 1.0};
37
 
38
ADD lookup, fragment.texcoord[0], distortedlookup;
39
TEX framebuffer, lookup, texture[0], 2D;
40
 
41
MOV finalcolor, framebuffer;
42
 
43
MOV result.color.rgb, finalcolor;
44
MOV result.color.a, program.env[0].x;
45
 
46
END