2 OPTION ARB_precision_hint_fastest;
3 # cgc version 3.1.0013, build date Apr 18 2012
4 # command line args: -profile arbfp1 -O3 -fastmath -fastprecision
5 # source file: fxaa_pp.cg
6 #vendor NVIDIA Corporation
10 #semantic fxaa_pp.fxaaQualityRcpFrame
11 #semantic fxaa_pp.fxaaQualitySubpix
12 #semantic fxaa_pp.fxaaQualityEdgeThreshold
13 #semantic fxaa_pp.fxaaQualityEdgeThresholdMin
14 #semantic fxaa_pp.nlTex0 : TEX0
15 #var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1
16 #var float2 fxaaQualityRcpFrame : : c[0] : 1 : 1
17 #var float fxaaQualitySubpix : : c[1] : 2 : 1
18 #var float fxaaQualityEdgeThreshold : : c[2] : 3 : 1
19 #var float fxaaQualityEdgeThresholdMin : : c[3] : 4 : 1
20 #var sampler2D nlTex0 : TEX0 : texunit 0 : 5 : 1
21 #var float4 oCol : $vout.COLOR : COL : 6 : 1
22 #const c[4] = 0 -1 1 -2
23 #const c[5] = 2 0.5 0.25 1.5
24 #const c[6] = 4 12 0.083333336 3
25 PARAM c[7] = { program.local[0..3],
27 { 2, 0.5, 0.25, 1.5 },
28 { 4, 12, 0.083333336, 3 } };
40 MAD R2.zw, R3.xyyz, c[0].xyxy, fragment.texcoord[0].xyxy;
41 MAD R0.xy, R3, c[0], fragment.texcoord[0];
42 MAD R1.xy, R3.zyzw, c[0], fragment.texcoord[0];
43 TEX R5.y, R1, texture[0], 2D;
44 MAD R1.xy, R3.zxzw, c[0], fragment.texcoord[0];
45 ADD R0.zw, fragment.texcoord[0].xyxy, -c[0].xyxy;
46 TEX R4.y, R0.zwzw, texture[0], 2D;
47 TEX R6.y, R2.zwzw, texture[0], 2D;
48 TEX R8, fragment.texcoord[0], texture[0], 2D;
49 TEX R1.y, R1, texture[0], 2D;
50 TEX R0.y, R0, texture[0], 2D;
52 MAD R1.z, R0.y, c[4].w, R0;
53 MAD R0.zw, R3.xyyx, c[0].xyxy, fragment.texcoord[0].xyxy;
54 TEX R2.y, R0.zwzw, texture[0], 2D;
57 ADD R1.zw, fragment.texcoord[0].xyxy, c[0].xyxy;
58 TEX R7.y, R1.zwzw, texture[0], 2D;
59 MAD R0.z, R8.y, c[4].w, R0.x;
61 MAD R2.x, R0.z, c[5], R0.w;
62 MAD R0.zw, R3.xyxz, c[0].xyxy, fragment.texcoord[0].xyxy;
63 TEX R3.y, R0.zwzw, texture[0], 2D;
66 MAD R0.w, R3.y, c[4], R1.x;
67 MAD R1.x, R8.y, c[4].w, R0.z;
73 MAD R1.x, R1.y, c[4].w, R0.w;
75 MAD R1.x, R2.y, c[4].w, R2.w;
76 MAD R1.z, R1, c[5].x, R1.w;
91 MAX R1.w, R2.x, c[3].x;
93 CMP R2.x, R2.z, c[4], c[4].z;
94 CMP R1.x, -R3.w, c[4], c[4].z;
96 CMP R1.z, -R3.w, R1.y, R3.y;
98 CMP R1.w, -R3, R2.y, R0.y;
101 CMP R3.y, -R3.w, c[0], R3.x;
104 SGE R0.y, R4.z, R4.w;
107 CMP R4.y, -R0, c[4].x, c[4].z;
109 CMP R0.y, -R0, c[4].x, c[4].z;
111 CMP R2.y, -R4.x, c[0], c[0].x;
112 CMP R2.y, -R1, -R2, R2;
113 MAD R1.y, R2, c[5], fragment.texcoord[0];
114 CMP R5.z, -R4.x, R1.y, fragment.texcoord[0].y;
116 MAD R0.y, R2, c[5], fragment.texcoord[0].x;
117 CMP R3.x, -R1, c[0], R3;
118 CMP R6.x, -R3.w, R0.y, fragment.texcoord[0];
119 ADD R5.w, R5.z, R3.y;
122 TEX R0.y, R1, texture[0], 2D;
126 MAD R0.z, R0.x, c[5].x, R0.w;
129 CMP R4.y, -R1, R1.z, R1.w;
130 ADD R1.z, R6.x, R3.x;
131 MAD R5.x, -R4.y, c[5].y, R0.y;
133 TEX R0.y, R1.zwzw, texture[0], 2D;
135 MAD R1.y, -R4, c[5], R0;
136 MUL R4.z, R1.w, c[5];
138 SGE R1.w, R0.y, R4.z;
142 CMP R6.y, -R1.w, c[4].x, c[4].z;
144 CMP R5.z, -R0.y, c[4].x, c[4];
145 ADD_SAT R0.y, R5.z, R6;
146 MUL R4.w, R2.x, R0.y;
148 MAD R1.w, R3.y, c[5], R5;
149 CMP R6.x, -R0.y, R1.w, R5.w;
150 MAD R6.z, R3.x, c[5].w, R1;
151 CMP R1.z, -R0.y, R6, R1;
153 TEX R0.y, R1.zwzw, texture[0], 2D;
155 CMP R6.y, -R1.w, R0, R1;
156 MUL R0.y, R2.x, R5.z;
157 MAD R1.y, -R3, c[5].w, R5;
158 CMP R5.w, -R0.y, R1.y, R5.y;
159 MAD R6.z, -R3.x, c[5].w, R1.x;
160 CMP R1.x, -R0.y, R6.z, R1;
162 TEX R0.y, R1, texture[0], 2D;
163 MUL R5.y, R4.w, R5.z;
164 CMP R0.y, -R5, R0, R5.x;
165 MAD R5.x, -R4.y, c[5].y, R0.y;
166 CMP R5.z, -R5.y, R5.x, R0.y;
167 MAD R1.y, -R4, c[5], R6;
168 CMP R1.y, -R1.w, R1, R6;
174 CMP R6.y, -R1.w, c[4].x, c[4].z;
176 CMP R5.y, -R0, c[4].x, c[4].z;
177 ADD_SAT R0.y, R5, R6;
178 MUL R5.x, R4.w, R0.y;
180 MAD R1.w, R3.y, c[5].x, R6.x;
181 CMP R6.x, -R0.y, R1.w, R6;
182 MAD R6.z, R3.x, c[5].x, R1;
183 CMP R1.z, -R0.y, R6, R1;
185 TEX R0.y, R1.zwzw, texture[0], 2D;
186 MUL R1.w, R5.x, R6.y;
187 CMP R6.y, -R1.w, R0, R1;
189 MAD R1.y, -R3, c[5].x, R5.w;
190 CMP R4.w, -R0.y, R1.y, R5;
191 MAD R6.z, -R3.x, c[5].x, R1.x;
192 CMP R1.x, -R0.y, R6.z, R1;
194 TEX R0.y, R1, texture[0], 2D;
196 CMP R0.y, -R5, R0, R5.z;
197 MAD R5.z, -R4.y, c[5].y, R0.y;
198 CMP R5.w, -R5.y, R5.z, R0.y;
199 MAD R1.y, -R4, c[5], R6;
200 CMP R1.y, -R1.w, R1, R6;
204 CMP R6.y, -R1.w, c[4].x, c[4].z;
208 CMP R5.y, -R0, c[4].x, c[4].z;
209 ADD_SAT R0.y, R5, R6;
210 MUL R5.z, R5.x, R0.y;
212 MAD R1.w, R3.y, c[6].x, R6.x;
213 CMP R6.x, -R0.y, R1.w, R6;
214 MAD R6.z, R3.x, c[6].x, R1;
215 CMP R1.z, -R0.y, R6, R1;
217 TEX R0.y, R1.zwzw, texture[0], 2D;
218 MUL R1.w, R5.z, R6.y;
219 CMP R6.y, -R1.w, R0, R1;
221 MAD R1.y, -R3, c[6].x, R4.w;
222 CMP R4.w, -R0.y, R1.y, R4;
223 MAD R5.x, -R3, c[6], R1;
224 CMP R1.x, -R0.y, R5, R1;
226 TEX R0.y, R1, texture[0], 2D;
228 CMP R5.x, -R1.y, R0.y, R5.w;
229 MAD R5.y, -R4, c[5], R5.x;
230 CMP R1.y, -R1, R5, R5.x;
231 MAD R0.y, -R4, c[5], R6;
232 CMP R0.y, -R1.w, R0, R6;
239 CMP R4.z, -R4, c[4].x, c[4];
240 CMP R1.w, -R1, c[4].x, c[4].z;
242 MAD R5.y, R3.x, c[6], R1.z;
243 CMP R5.y, -R4.z, R5, R1.z;
244 MAD R5.x, R3.y, c[6].y, R6;
245 CMP R1.z, -R4, R5.x, R6.x;
247 ADD R4.z, -fragment.texcoord[0].x, R5.y;
248 ADD R1.z, -fragment.texcoord[0].y, R1;
249 CMP R1.z, -R3.w, R1, R4;
250 MAD R4.z, -R3.x, c[6].y, R1.x;
251 MAD R3.x, -R3.y, c[6].y, R4.w;
252 CMP R3.y, -R1.w, R4.z, R1.x;
253 CMP R1.x, -R1.w, R3, R4.w;
254 ADD R1.w, fragment.texcoord[0].x, -R3.y;
255 ADD R1.x, fragment.texcoord[0].y, -R1;
256 CMP R1.x, -R3.w, R1, R1.w;
257 SLT R1.w, R1.x, R1.z;
261 CMP R1.w, -R1, c[4].x, c[4].z;
262 MUL R1.z, R2.x, R1.w;
264 MAD R1.x, R1, -R3, c[5].y;
265 MUL R1.w, R4.y, c[5].y;
266 SLT R3.x, R1.y, c[4];
268 SLT R0.y, R0, c[4].x;
273 CMP R0.y, -R0, c[4].z, c[4].x;
274 CMP R1.y, -R1, c[4].z, c[4].x;
275 CMP R0.x, -R1.z, R0.y, R1.y;
276 MAD R0.y, R0.z, c[6].z, -R8;
278 CMP R0.x, -R0, c[4], c[4].z;
280 CMP R0.x, -R0, c[4], R1;
283 MUL_SAT R0.y, R0, R0.z;
284 MUL R0.z, R0.y, c[4].w;
285 ADD R0.z, R0, c[6].w;
289 MUL R0.y, R0, c[1].x;
291 MAD R0.y, R0.x, R2, fragment.texcoord[0];
292 MAD R0.z, R0.x, R2.y, fragment.texcoord[0].x;
293 CMP R0.x, -R3.w, R0.z, fragment.texcoord[0];
294 CMP R0.y, -R4.x, R0, fragment.texcoord[0];
295 TEX R0.xyz, R0, texture[0], 2D;
296 CMP R1, R2.z, R8, R9;
298 CMP result.color, -R2.x, R0, R1;
300 # 260 instructions, 10 R-regs