Change Encyclo button name and macros icon
[ryzomcore.git] / nel / src / 3d / fxaa_program.h
bloba6bf847ef42b418ec0c34a8253336b31fe32c6c1
2 const char *a_nelvp =
3 "!!VP1.0\n"
4 "DP4 o[HPOS].x, c[0], v[OPOS];\n"
5 "DP4 o[HPOS].y, c[1], v[OPOS];\n"
6 "DP4 o[HPOS].z, c[2], v[OPOS];\n"
7 "DP4 o[HPOS].w, c[3], v[OPOS];\n"
8 "MOV o[TEX0].xy, v[TEX0];\n"
9 // "ADD o[TEX1], v[TEX0].xyxy, c[9];\n"
10 "END\n";
12 const char *a_arbfp1_test =
13 "!!ARBfp1.0\n"
14 "OPTION ARB_precision_hint_fastest;\n"
15 "TEX result.color, fragment.texcoord[1].zwzw, texture[0], 2D;\n"
16 "END\n";
18 const char *a_arbfp1 =
19 "!!ARBfp1.0\n"
20 "OPTION ARB_precision_hint_fastest;\n"
21 /*"# cgc version 3.1.0013, build date Apr 18 2012\n"
22 "# command line args: -profile arbfp1 -O3 -fastmath -fastprecision\n"
23 "# source file: fxaa_pp.cg\n"
24 "#vendor NVIDIA Corporation\n"
25 "#version 3.1.0.13\n"
26 "#profile arbfp1\n"
27 "#program fxaa_pp\n"
28 "#semantic fxaa_pp.fxaaQualityRcpFrame\n"
29 "#semantic fxaa_pp.fxaaQualitySubpix\n"
30 "#semantic fxaa_pp.fxaaQualityEdgeThreshold\n"
31 "#semantic fxaa_pp.fxaaQualityEdgeThresholdMin\n"
32 "#semantic fxaa_pp.nlTex0 : TEX0\n"
33 "#var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1\n"
34 "#var float2 fxaaQualityRcpFrame : : c[0] : 2 : 1\n"
35 "#var float fxaaQualitySubpix : : c[1] : 3 : 1\n"
36 "#var float fxaaQualityEdgeThreshold : : c[2] : 4 : 1\n"
37 "#var float fxaaQualityEdgeThresholdMin : : c[3] : 5 : 1\n"
38 "#var sampler2D nlTex0 : TEX0 : texunit 0 : 6 : 1\n"
39 "#var float4 oCol : $vout.COLOR : COL : 7 : 1\n"
40 "#const c[4] = 0 -1 1 -2\n"
41 "#const c[5] = 2 0.5 0.25 1.5\n"
42 "#const c[6] = 4 12 0.083333336 3\n"*/
43 "PARAM c[7] = { program.env[0..3],\n"
44 " { 0, -1, 1, -2 },\n"
45 " { 2, 0.5, 0.25, 1.5 },\n"
46 " { 4, 12, 0.083333336, 3 } };\n"
47 "TEMP R0;\n"
48 "TEMP R1;\n"
49 "TEMP R2;\n"
50 "TEMP R3;\n"
51 "TEMP R4;\n"
52 "TEMP R5;\n"
53 "TEMP R6;\n"
54 "TEMP R7;\n"
55 "TEMP R8;\n"
56 "TEMP R9;\n"
57 "MOV R3.xyz, c[4];\n"
58 "MAD R2.zw, R3.xyyz, c[0].xyxy, fragment.texcoord[0].xyxy;\n"
59 "MAD R0.xy, R3, c[0], fragment.texcoord[0];\n"
60 "MAD R1.xy, R3.zyzw, c[0], fragment.texcoord[0];\n"
61 "TEX R5.y, R1, texture[0], 2D;\n"
62 "MAD R1.xy, R3.zxzw, c[0], fragment.texcoord[0];\n"
63 "ADD R0.zw, fragment.texcoord[0].xyxy, -c[0].xyxy;\n"
64 "TEX R4.y, R0.zwzw, texture[0], 2D;\n"
65 "TEX R6.y, R2.zwzw, texture[0], 2D;\n"
66 "TEX R8, fragment.texcoord[0], texture[0], 2D;\n"
67 "TEX R1.y, R1, texture[0], 2D;\n"
68 "TEX R0.y, R0, texture[0], 2D;\n"
69 "ADD R0.z, R4.y, R5.y;\n"
70 "MAD R1.z, R0.y, c[4].w, R0;\n"
71 "MAD R0.zw, R3.xyyx, c[0].xyxy, fragment.texcoord[0].xyxy;\n"
72 "TEX R2.y, R0.zwzw, texture[0], 2D;\n"
73 "ADD R0.x, R2.y, R1.y;\n"
74 "ABS R0.w, R1.z;\n"
75 "ADD R1.zw, fragment.texcoord[0].xyxy, c[0].xyxy;\n"
76 "TEX R7.y, R1.zwzw, texture[0], 2D;\n"
77 "MAD R0.z, R8.y, c[4].w, R0.x;\n"
78 "ABS R0.z, R0;\n"
79 "MAD R2.x, R0.z, c[5], R0.w;\n"
80 "MAD R0.zw, R3.xyxz, c[0].xyxy, fragment.texcoord[0].xyxy;\n"
81 "TEX R3.y, R0.zwzw, texture[0], 2D;\n"
82 "ADD R0.z, R0.y, R3.y;\n"
83 "ADD R1.x, R6.y, R7.y;\n"
84 "MAD R0.w, R3.y, c[4], R1.x;\n"
85 "MAD R1.x, R8.y, c[4].w, R0.z;\n"
86 "ABS R0.w, R0;\n"
87 "ADD R2.x, R0.w, R2;\n"
88 "ADD R2.w, R4.y, R6.y;\n"
89 "ADD R0.w, R5.y, R7.y;\n"
90 "ABS R1.z, R1.x;\n"
91 "MAD R1.x, R1.y, c[4].w, R0.w;\n"
92 "ABS R1.w, R1.x;\n"
93 "MAD R1.x, R2.y, c[4].w, R2.w;\n"
94 "MAD R1.z, R1, c[5].x, R1.w;\n"
95 "ABS R1.x, R1;\n"
96 "ADD R1.x, R1, R1.z;\n"
97 "SGE R4.x, R1, R2;\n"
98 "MAX R1.x, R3.y, R8.y;\n"
99 "MAX R1.z, R1.y, R1.x;\n"
100 "MAX R1.x, R0.y, R2.y;\n"
101 "MAX R1.x, R1, R1.z;\n"
102 "MIN R1.z, R3.y, R8.y;\n"
103 "MIN R1.w, R1.y, R1.z;\n"
104 "MIN R1.z, R0.y, R2.y;\n"
105 "MIN R1.z, R1, R1.w;\n"
106 "MUL R2.x, R1, c[2];\n"
107 "ADD R3.z, R1.x, -R1;\n"
108 "ABS R3.w, R4.x;\n"
109 "MAX R1.w, R2.x, c[3].x;\n"
110 "ADD R2.z, R3, -R1.w;\n"
111 "CMP R2.x, R2.z, c[4], c[4].z;\n"
112 "CMP R1.x, -R3.w, c[4], c[4].z;\n"
113 "MUL R3.w, R2.x, R1.x;\n"
114 "CMP R1.z, -R3.w, R1.y, R3.y;\n"
115 "ADD R1.y, -R8, R1.z;\n"
116 "CMP R1.w, -R3, R2.y, R0.y;\n"
117 "ADD R0.y, -R8, R1.w;\n"
118 "MUL R4.x, R2, R4;\n"
119 "CMP R3.y, -R3.w, c[0], R3.x;\n"
120 "ABS R4.w, R1.y;\n"
121 "ABS R4.z, R0.y;\n"
122 "SGE R0.y, R4.z, R4.w;\n"
123 "MUL R1.y, R2.x, R0;\n"
124 "ABS R0.y, R0;\n"
125 "CMP R4.y, -R0, c[4].x, c[4].z;\n"
126 "ABS R0.y, R1.x;\n"
127 "CMP R0.y, -R0, c[4].x, c[4].z;\n"
128 "MUL R1.x, R2, R0.y;\n"
129 "CMP R2.y, -R4.x, c[0], c[0].x;\n"
130 "CMP R2.y, -R1, -R2, R2;\n"
131 "MAD R1.y, R2, c[5], fragment.texcoord[0];\n"
132 "CMP R5.z, -R4.x, R1.y, fragment.texcoord[0].y;\n"
133 "ADD R5.y, R5.z, -R3;\n"
134 "MAD R0.y, R2, c[5], fragment.texcoord[0].x;\n"
135 "CMP R3.x, -R1, c[0], R3;\n"
136 "CMP R6.x, -R3.w, R0.y, fragment.texcoord[0];\n"
137 "ADD R5.w, R5.z, R3.y;\n"
138 "ADD R1.x, R6, -R3;\n"
139 "MOV R1.y, R5;\n"
140 "TEX R0.y, R1, texture[0], 2D;\n"
141 "MUL R1.y, R2.x, R4;\n"
142 "ADD R0.x, R0.z, R0;\n"
143 "ADD R0.w, R2, R0;\n"
144 "MAD R0.z, R0.x, c[5].x, R0.w;\n"
145 "ADD R1.w, R8.y, R1;\n"
146 "ADD R1.z, R8.y, R1;\n"
147 "CMP R4.y, -R1, R1.z, R1.w;\n"
148 "ADD R1.z, R6.x, R3.x;\n"
149 "MAD R5.x, -R4.y, c[5].y, R0.y;\n"
150 "MOV R1.w, R5;\n"
151 "TEX R0.y, R1.zwzw, texture[0], 2D;\n"
152 "MAX R1.w, R4.z, R4;\n"
153 "MAD R1.y, -R4, c[5], R0;\n"
154 "MUL R4.z, R1.w, c[5];\n"
155 "ABS R0.y, R1;\n"
156 "SGE R1.w, R0.y, R4.z;\n"
157 "ABS R6.y, R5.x;\n"
158 "SGE R0.y, R6, R4.z;\n"
159 "ABS R1.w, R1;\n"
160 "CMP R6.y, -R1.w, c[4].x, c[4].z;\n"
161 "ABS R0.y, R0;\n"
162 "CMP R5.z, -R0.y, c[4].x, c[4];\n"
163 "ADD_SAT R0.y, R5.z, R6;\n"
164 "MUL R4.w, R2.x, R0.y;\n"
165 "MUL R0.y, R2.x, R6;\n"
166 "MAD R1.w, R3.y, c[5], R5;\n"
167 "CMP R6.x, -R0.y, R1.w, R5.w;\n"
168 "MAD R6.z, R3.x, c[5].w, R1;\n"
169 "CMP R1.z, -R0.y, R6, R1;\n"
170 "MOV R1.w, R6.x;\n"
171 "TEX R0.y, R1.zwzw, texture[0], 2D;\n"
172 "MUL R1.w, R4, R6.y;\n"
173 "CMP R6.y, -R1.w, R0, R1;\n"
174 "MUL R0.y, R2.x, R5.z;\n"
175 "MAD R1.y, -R3, c[5].w, R5;\n"
176 "CMP R5.w, -R0.y, R1.y, R5.y;\n"
177 "MAD R6.z, -R3.x, c[5].w, R1.x;\n"
178 "CMP R1.x, -R0.y, R6.z, R1;\n"
179 "MOV R1.y, R5.w;\n"
180 "TEX R0.y, R1, texture[0], 2D;\n"
181 "MUL R5.y, R4.w, R5.z;\n"
182 "CMP R0.y, -R5, R0, R5.x;\n"
183 "MAD R5.x, -R4.y, c[5].y, R0.y;\n"
184 "CMP R5.z, -R5.y, R5.x, R0.y;\n"
185 "MAD R1.y, -R4, c[5], R6;\n"
186 "CMP R1.y, -R1.w, R1, R6;\n"
187 "ABS R1.w, R1.y;\n"
188 "SGE R1.w, R1, R4.z;\n"
189 "ABS R0.y, R5.z;\n"
190 "SGE R0.y, R0, R4.z;\n"
191 "ABS R1.w, R1;\n"
192 "CMP R6.y, -R1.w, c[4].x, c[4].z;\n"
193 "ABS R0.y, R0;\n"
194 "CMP R5.y, -R0, c[4].x, c[4].z;\n"
195 "ADD_SAT R0.y, R5, R6;\n"
196 "MUL R5.x, R4.w, R0.y;\n"
197 "MUL R0.y, R4.w, R6;\n"
198 "MAD R1.w, R3.y, c[5].x, R6.x;\n"
199 "CMP R6.x, -R0.y, R1.w, R6;\n"
200 "MAD R6.z, R3.x, c[5].x, R1;\n"
201 "CMP R1.z, -R0.y, R6, R1;\n"
202 "MOV R1.w, R6.x;\n"
203 "TEX R0.y, R1.zwzw, texture[0], 2D;\n"
204 "MUL R1.w, R5.x, R6.y;\n"
205 "CMP R6.y, -R1.w, R0, R1;\n"
206 "MUL R0.y, R4.w, R5;\n"
207 "MAD R1.y, -R3, c[5].x, R5.w;\n"
208 "CMP R4.w, -R0.y, R1.y, R5;\n"
209 "MAD R6.z, -R3.x, c[5].x, R1.x;\n"
210 "CMP R1.x, -R0.y, R6.z, R1;\n"
211 "MOV R1.y, R4.w;\n"
212 "TEX R0.y, R1, texture[0], 2D;\n"
213 "MUL R5.y, R5.x, R5;\n"
214 "CMP R0.y, -R5, R0, R5.z;\n"
215 "MAD R5.z, -R4.y, c[5].y, R0.y;\n"
216 "CMP R5.w, -R5.y, R5.z, R0.y;\n"
217 "MAD R1.y, -R4, c[5], R6;\n"
218 "CMP R1.y, -R1.w, R1, R6;\n"
219 "ABS R1.w, R1.y;\n"
220 "SGE R1.w, R1, R4.z;\n"
221 "ABS R1.w, R1;\n"
222 "CMP R6.y, -R1.w, c[4].x, c[4].z;\n"
223 "ABS R0.y, R5.w;\n"
224 "SGE R0.y, R0, R4.z;\n"
225 "ABS R0.y, R0;\n"
226 "CMP R5.y, -R0, c[4].x, c[4].z;\n"
227 "ADD_SAT R0.y, R5, R6;\n"
228 "MUL R5.z, R5.x, R0.y;\n"
229 "MUL R0.y, R5.x, R6;\n"
230 "MAD R1.w, R3.y, c[6].x, R6.x;\n"
231 "CMP R6.x, -R0.y, R1.w, R6;\n"
232 "MAD R6.z, R3.x, c[6].x, R1;\n"
233 "CMP R1.z, -R0.y, R6, R1;\n"
234 "MOV R1.w, R6.x;\n"
235 "TEX R0.y, R1.zwzw, texture[0], 2D;\n"
236 "MUL R1.w, R5.z, R6.y;\n"
237 "CMP R6.y, -R1.w, R0, R1;\n"
238 "MUL R0.y, R5.x, R5;\n"
239 "MAD R1.y, -R3, c[6].x, R4.w;\n"
240 "CMP R4.w, -R0.y, R1.y, R4;\n"
241 "MAD R5.x, -R3, c[6], R1;\n"
242 "CMP R1.x, -R0.y, R5, R1;\n"
243 "MOV R1.y, R4.w;\n"
244 "TEX R0.y, R1, texture[0], 2D;\n"
245 "MUL R1.y, R5.z, R5;\n"
246 "CMP R5.x, -R1.y, R0.y, R5.w;\n"
247 "MAD R5.y, -R4, c[5], R5.x;\n"
248 "CMP R1.y, -R1, R5, R5.x;\n"
249 "MAD R0.y, -R4, c[5], R6;\n"
250 "CMP R0.y, -R1.w, R0, R6;\n"
251 "ABS R5.x, R0.y;\n"
252 "ABS R1.w, R1.y;\n"
253 "SGE R1.w, R1, R4.z;\n"
254 "SGE R5.x, R5, R4.z;\n"
255 "ABS R4.z, R5.x;\n"
256 "ABS R1.w, R1;\n"
257 "CMP R4.z, -R4, c[4].x, c[4];\n"
258 "CMP R1.w, -R1, c[4].x, c[4].z;\n"
259 "MUL R4.z, R5, R4;\n"
260 "MAD R5.y, R3.x, c[6], R1.z;\n"
261 "CMP R5.y, -R4.z, R5, R1.z;\n"
262 "MAD R5.x, R3.y, c[6].y, R6;\n"
263 "CMP R1.z, -R4, R5.x, R6.x;\n"
264 "MUL R1.w, R5.z, R1;\n"
265 "ADD R4.z, -fragment.texcoord[0].x, R5.y;\n"
266 "ADD R1.z, -fragment.texcoord[0].y, R1;\n"
267 "CMP R1.z, -R3.w, R1, R4;\n"
268 "MAD R4.z, -R3.x, c[6].y, R1.x;\n"
269 "MAD R3.x, -R3.y, c[6].y, R4.w;\n"
270 "CMP R3.y, -R1.w, R4.z, R1.x;\n"
271 "CMP R1.x, -R1.w, R3, R4.w;\n"
272 "ADD R1.w, fragment.texcoord[0].x, -R3.y;\n"
273 "ADD R1.x, fragment.texcoord[0].y, -R1;\n"
274 "CMP R1.x, -R3.w, R1, R1.w;\n"
275 "SLT R1.w, R1.x, R1.z;\n"
276 "ADD R3.x, R1, R1.z;\n"
277 "ABS R1.w, R1;\n"
278 "MIN R1.x, R1, R1.z;\n"
279 "CMP R1.w, -R1, c[4].x, c[4].z;\n"
280 "MUL R1.z, R2.x, R1.w;\n"
281 "RCP R3.x, R3.x;\n"
282 "MAD R1.x, R1, -R3, c[5].y;\n"
283 "MUL R1.w, R4.y, c[5].y;\n"
284 "SLT R3.x, R1.y, c[4];\n"
285 "SLT R1.y, R8, R1.w;\n"
286 "SLT R0.y, R0, c[4].x;\n"
287 "ADD R0.y, R0, -R1;\n"
288 "ADD R1.y, -R1, R3.x;\n"
289 "ABS R0.y, R0;\n"
290 "ABS R1.y, R1;\n"
291 "CMP R0.y, -R0, c[4].z, c[4].x;\n"
292 "CMP R1.y, -R1, c[4].z, c[4].x;\n"
293 "CMP R0.x, -R1.z, R0.y, R1.y;\n"
294 "MAD R0.y, R0.z, c[6].z, -R8;\n"
295 "ABS R0.x, R0;\n"
296 "CMP R0.x, -R0, c[4], c[4].z;\n"
297 "MUL R0.x, R2, R0;\n"
298 "CMP R0.x, -R0, c[4], R1;\n"
299 "RCP R0.z, R3.z;\n"
300 "ABS R0.y, R0;\n"
301 "MUL_SAT R0.y, R0, R0.z;\n"
302 "MUL R0.z, R0.y, c[4].w;\n"
303 "ADD R0.z, R0, c[6].w;\n"
304 "MUL R0.y, R0, R0;\n"
305 "MUL R0.y, R0.z, R0;\n"
306 "MUL R0.y, R0, R0;\n"
307 "MUL R0.y, R0, c[1].x;\n"
308 "MAX R0.x, R0, R0.y;\n"
309 "MAD R0.y, R0.x, R2, fragment.texcoord[0];\n"
310 "MAD R0.z, R0.x, R2.y, fragment.texcoord[0].x;\n"
311 "CMP R0.x, -R3.w, R0.z, fragment.texcoord[0];\n"
312 "CMP R0.y, -R4.x, R0, fragment.texcoord[0];\n"
313 "TEX R0.xyz, R0, texture[0], 2D;\n"
314 "CMP R1, R2.z, R8, R9;\n"
315 "MOV R0.w, R8.y;\n"
316 "CMP result.color, -R2.x, R0, R1;\n"
317 "END\n";
318 /*"# 260 instructions, 10 R-regs\n"
319 "\n"*/
321 const char *a_arbfp1_ps3 =
322 "!!ARBfp1.0\n"
323 "OPTION ARB_precision_hint_fastest;\n"
324 //# cgc version 3.1.0013, build date Apr 18 2012
325 //# command line args: -profile arbfp1 -O3 -fastmath -fastprecision
326 //# source file: fxaa_fp.cg
327 //#vendor NVIDIA Corporation
328 //#version 3.1.0.13
329 //#profile arbfp1
330 //#program fxaa_fp
331 //#semantic fxaa_fp.fxaaConsoleRcpFrameOpt
332 //#semantic fxaa_fp.fxaaConsoleRcpFrameOpt2
333 //#semantic fxaa_fp.nlTex0 : TEX0
334 //#var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1
335 //#var float4 fxaaConsolePosPos : $vin.TEXCOORD1 : TEX1 : 1 : 1
336 //#var float4 fxaaConsoleRcpFrameOpt : : c[0] : 2 : 1
337 //#var float4 fxaaConsoleRcpFrameOpt2 : : c[1] : 3 : 1
338 //#var sampler2D nlTex0 : TEX0 : texunit 0 : 4 : 1
339 //#var float4 oCol : $vout.COLOR : COL : 5 : 1
340 //#const c[2] = 0.125 0 -2 2
341 //#const c[3] = 0.001953125 0.5
342 "PARAM c[4] = { program.env[0..1],\n"
343 " { 0.125, 0, -2, 2 },\n"
344 " { 0.001953125, 0.5 } };\n"
345 "TEMP R0;\n"
346 "TEMP R1;\n"
347 "TEMP R2;\n"
348 "TEMP R3;\n"
349 "TEMP R4;\n"
350 "TEMP R5;\n"
351 "TEX R1.w, fragment.texcoord[1].zyzw, texture[0], 2D;\n"
352 "ADD R0.x, R1.w, c[3];\n"
353 "TEX R0.w, fragment.texcoord[1].xwzw, texture[0], 2D;\n"
354 "TEX R1.w, fragment.texcoord[1], texture[0], 2D;\n"
355 "ADD R0.y, -R0.x, R0.w;\n"
356 "ADD R0.z, R1.w, R0.y;\n"
357 "TEX R2.w, fragment.texcoord[1].zwzw, texture[0], 2D;\n"
358 "ADD R0.y, -R1.w, R0;\n"
359 "ADD R1.x, R2.w, R0.y;\n"
360 "ADD R1.y, R0.z, -R2.w;\n"
361 "MUL R2.xy, R1, R1;\n"
362 "ADD R0.y, R2.x, R2;\n"
363 "RSQ R0.y, R0.y;\n"
364 "MUL R2.xy, R0.y, R1;\n"
365 "MAD R3.xy, R2, c[0].zwzw, fragment.texcoord[0];\n"
366 "ABS R0.z, R2.y;\n"
367 "ABS R0.y, R2.x;\n"
368 "MIN R0.y, R0, R0.z;\n"
369 "RCP R0.y, R0.y;\n"
370 "MUL R1.xy, R0.y, R2;\n"
371 "MUL R1.xy, R1, c[2].x;\n"
372 "MIN R1.xy, R1, c[2].w;\n"
373 "TEX R4, R3, texture[0], 2D;\n"
374 "MAD R2.xy, -R2, c[0].zwzw, fragment.texcoord[0];\n"
375 "TEX R3, R2, texture[0], 2D;\n"
376 "ADD R3, R3, R4;\n"
377 "MAX R1.xy, R1, c[2].z;\n"
378 "MAD R2.xy, R1, c[1].zwzw, fragment.texcoord[0];\n"
379 "MUL R5, R3, c[3].y;\n"
380 "MAD R1.xy, -R1, c[1].zwzw, fragment.texcoord[0];\n"
381 "MIN R0.z, R0.x, R2.w;\n"
382 "MIN R0.y, R0.w, R1.w;\n"
383 "MIN R0.y, R0, R0.z;\n"
384 "MAX R0.z, R0.x, R2.w;\n"
385 "MAX R0.x, R0.w, R1.w;\n"
386 "MAX R0.x, R0, R0.z;\n"
387 "TEX R4, R2, texture[0], 2D;\n"
388 "TEX R3, R1, texture[0], 2D;\n"
389 "ADD R3, R3, R4;\n"
390 "MAD R3, R3, c[3].y, R5;\n"
391 "MUL R3, R3, c[3].y;\n"
392 "SLT R0.z, R0.x, R3.w;\n"
393 "SLT R0.x, R3.w, R0.y;\n"
394 "ADD_SAT R0.x, R0, R0.z;\n"
395 "CMP result.color, -R0.x, R5, R3;\n"
396 "END\n";
397 //# 45 instructions, 6 R-regs
399 const char *a_arbfp1_earlyexit =
400 "!!ARBfp1.0\n"
401 "OPTION ARB_precision_hint_fastest;\n"
402 //"# cgc version 3.1.0013, build date Apr 18 2012\n"
403 //"# command line args: -profile arbfp1\n"
404 //"# source file: fxaa_fp.cg\n"
405 //"#vendor NVIDIA Corporation\n"
406 //"#version 3.1.0.13\n"
407 //"#profile arbfp1\n"
408 //"#program fxaa_fp\n"
409 //"#semantic fxaa_fp.fxaaConsoleRcpFrameOpt\n"
410 //"#semantic fxaa_fp.fxaaConsoleRcpFrameOpt2\n"
411 //"#semantic fxaa_fp.nlTex0 : TEX0\n"
412 //"#var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1\n"
413 //"#var float4 fxaaConsolePosPos : $vin.TEXCOORD1 : TEX1 : 1 : 1\n"
414 //"#var float4 fxaaConsoleRcpFrameOpt : : c[0] : 2 : 1\n"
415 //"#var float4 fxaaConsoleRcpFrameOpt2 : : c[1] : 3 : 1\n"
416 //"#var sampler2D nlTex0 : TEX0 : texunit 0 : 4 : 1\n"
417 //"#var float4 oCol : $vout.COLOR : COL : 5 : 1\n"
418 //"#const c[2] = 0.125 0 8 0.001953125\n"
419 //"#const c[3] = -2 2 0.5\n"
420 "PARAM c[4] = { program.env[0..1],\n"
421 " { 0.125, 0, 8, 0.001953125 },\n"
422 " { -2, 2, 0.5 } };\n"
423 "TEMP R0;\n"
424 "TEMP R1;\n"
425 "TEMP R2;\n"
426 "TEMP R3;\n"
427 "TEMP R4;\n"
428 "TEMP R5;\n"
429 "TEX R0.w, fragment.texcoord[1].zyzw, texture[0], 2D;\n"
430 "ADD R0.x, R0.w, c[2].w;\n"
431 "TEX R1.w, fragment.texcoord[1].xwzw, texture[0], 2D;\n"
432 "TEX R0.w, fragment.texcoord[1], texture[0], 2D;\n"
433 "ADD R0.y, R1.w, -R0.x;\n"
434 "ADD R0.z, R0.w, R0.y;\n"
435 "TEX R2.w, fragment.texcoord[1].zwzw, texture[0], 2D;\n"
436 "ADD R0.y, -R0.w, R0;\n"
437 "ADD R1.z, -R2.w, R0;\n"
438 "ADD R1.x, R2.w, R0.y;\n"
439 "MOV R1.y, c[2];\n"
440 "DP3 R0.y, R1, R1;\n"
441 "RSQ R0.y, R0.y;\n"
442 "MUL R2.xy, R0.y, R1.xzzw;\n"
443 "MAD R3.xy, R2, c[0].zwzw, fragment.texcoord[0];\n"
444 "ABS R0.z, R2.y;\n"
445 "ABS R0.y, R2.x;\n"
446 "MIN R0.y, R0, R0.z;\n"
447 "RCP R0.y, R0.y;\n"
448 "MUL R1.xy, R0.y, R2;\n"
449 "MUL R1.xy, R1, c[2].x;\n"
450 "MIN R1.xy, R1, c[3].y;\n"
451 "MIN R0.y, R0.w, R1.w;\n"
452 "TEX R4, R3, texture[0], 2D;\n"
453 "MAD R2.xy, -R2, c[0].zwzw, fragment.texcoord[0];\n"
454 "TEX R3, R2, texture[0], 2D;\n"
455 "ADD R3, R3, R4;\n"
456 "MAX R1.xy, R1, c[3].x;\n"
457 "MAD R2.xy, R1, c[1].zwzw, fragment.texcoord[0];\n"
458 "MAD R1.xy, -R1, c[1].zwzw, fragment.texcoord[0];\n"
459 "MUL R5, R3, c[3].z;\n"
460 "TEX R4, R2, texture[0], 2D;\n"
461 "TEX R3, R1, texture[0], 2D;\n"
462 "MIN R0.z, R0.x, R2.w;\n"
463 "MIN R1.x, R0.y, R0.z;\n"
464 "MAX R0.y, R0.x, R2.w;\n"
465 "MAX R0.x, R0.w, R1.w;\n"
466 "MAX R2.x, R0, R0.y;\n"
467 "ADD R3, R3, R4;\n"
468 "MAD R3, R3, c[3].z, R5;\n"
469 "MUL R3, R3, c[3].z;\n"
470 "SLT R1.z, R2.x, R3.w;\n"
471 "SLT R1.y, R3.w, R1.x;\n"
472 "TEX R0, fragment.texcoord[0], texture[0], 2D;\n"
473 "ADD_SAT R1.y, R1, R1.z;\n"
474 "MIN R1.z, R0.w, R1.x;\n"
475 "MAX R1.x, R2, R0.w;\n"
476 "ADD R2.y, R1.x, -R1.z;\n"
477 "CMP R1, -R1.y, R5, R3;\n"
478 "MAD R2.x, R2.y, c[2].z, -R2;\n"
479 "CMP result.color, R2.x, R0, R1;\n"
480 "END\n";
481 //"# 51 instructions, 6 R-regs\n"
483 const char *a_ps_2_0_test_t0 =
484 "ps_2_x\n"
485 "dcl_2d s0\n"
486 "dcl t0.xyz\n"
487 "mov r0.xy, t0.xy\n"
488 "texld r0, r0, s0\n"
489 "mov oC0, r0\n";
491 const char *a_ps_2_0_test_avg =
492 "ps_2_x\n"
493 "dcl_2d s0\n"
494 "def c0, 0.25000000, 0, 0, 0\n"
495 "dcl t1\n"
496 "mov r0.xy, t1.xwzw\n"
497 "mov r1.xy, t1.zyzw\n"
498 "texld r0, r0, s0\n"
499 "texld r1, r1, s0\n"
500 "add r2, r1, r0\n"
501 "mov r0.xy, t1.zwzw\n"
502 "texld r1, t1, s0\n"
503 "texld r0, r0, s0\n"
504 "add r1, r2, r1\n"
505 "add r0, r1, r0\n"
506 "mul r0, r0, c0.x\n"
507 "mov oC0, r0\n";
509 const char *a_ps_2_0 =
510 "ps_2_x\n"
511 /*"// cgc version 3.1.0013, build date Apr 18 2012\n"
512 "// command line args: -profile ps_2_x -O3 -fastmath -fastprecision\n"
513 "// source file: fxaa_pp.cg\n"
514 "//vendor NVIDIA Corporation\n"
515 "//version 3.1.0.13\n"
516 "//profile ps_2_x\n"
517 "//program fxaa_pp\n"
518 "//semantic fxaa_pp.fxaaQualityRcpFrame\n"
519 "//semantic fxaa_pp.fxaaQualitySubpix\n"
520 "//semantic fxaa_pp.fxaaQualityEdgeThreshold\n"
521 "//semantic fxaa_pp.fxaaQualityEdgeThresholdMin\n"
522 "//semantic fxaa_pp.nlTex0 : TEX0\n"
523 "//var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1\n"
524 "//var float2 fxaaQualityRcpFrame : : c[0] : 2 : 1\n"
525 "//var float fxaaQualitySubpix : : c[1] : 3 : 1\n"
526 "//var float fxaaQualityEdgeThreshold : : c[2] : 4 : 1\n"
527 "//var float fxaaQualityEdgeThresholdMin : : c[3] : 5 : 1\n"
528 "//var sampler2D nlTex0 : TEX0 : texunit 0 : 6 : 1\n"
529 "//var float4 oCol : $vout.COLOR : COL : 7 : 1\n"
530 "//const c[4] = 0 -1 1 -2\n"
531 "//const c[5] = 2 0.5 0.25 1.5\n"
532 "//const c[6] = 4 12 0.083333336\n"
533 "//const c[7] = -2 3\n"*/
534 "dcl_2d s0\n"
535 "def c4, 0.00000000, -1.00000000, 1.00000000, -2.00000000\n"
536 "def c5, 2.00000000, 0.50000000, 0.25000000, 1.50000000\n"
537 "def c6, 4.00000000, 12.00000000, 0.08333334, 0\n"
538 "def c7, -2.00000000, 3.00000000, 0, 0\n"
539 "dcl t0.xy\n"
540 "mov r0.zw, c0.xyxy\n"
541 "mad r3.xy, c4.zxzw, r0.zwzw, t0\n"
542 "texld r7, r3, s0\n"
543 "texld r1, t0, s0\n"
544 "mov r0.xy, c0\n"
545 "mad r0.xy, c4.yxzw, r0, t0\n"
546 "texld r8, r0, s0\n"
547 "mov r0.xy, c0\n"
548 "mad r0.xy, c4, r0, t0\n"
549 "texld r9, r0, s0\n"
550 "add r0.xy, t0, -c0\n"
551 "texld r5, r0, s0\n"
552 "mov r3.xy, c0\n"
553 "mad r3.xy, c4.zyzw, r3, t0\n"
554 "texld r3, r3, s0\n"
555 "add r7.x, r8.y, r7.y\n"
556 "mad r0.z, r1.y, c4.w, r7.x\n"
557 "add r0.x, r5.y, r3.y\n"
558 "mad r0.w, r9.y, c4, r0.x\n"
559 "mov r0.xy, c0\n"
560 "mad r0.xy, c4.xzzw, r0, t0\n"
561 "texld r6, r0, s0\n"
562 "add r5.x, r9.y, r6.y\n"
563 "abs r0.z, r0\n"
564 "abs r0.w, r0\n"
565 "mad r3.x, r0.z, c5, r0.w\n"
566 "mov r0.zw, c0.xyxy\n"
567 "mad r4.xy, c4.yzzw, r0.zwzw, t0\n"
568 "texld r4, r4, s0\n"
569 "add r0.xy, t0, c0\n"
570 "texld r0, r0, s0\n"
571 "add r4.x, r5.y, r4.y\n"
572 "add r5.y, r3, r0\n"
573 "add r0.x, r4.y, r0.y\n"
574 "mad r0.x, r6.y, c4.w, r0\n"
575 "abs r0.x, r0\n"
576 "add r0.w, r0.x, r3.x\n"
577 "mad r0.x, r8.y, c4.w, r4\n"
578 "mad r0.z, r7.y, c4.w, r5.y\n"
579 "mad r0.y, r1, c4.w, r5.x\n"
580 "abs r0.z, r0\n"
581 "abs r0.y, r0\n"
582 "mad r0.y, r0, c5.x, r0.z\n"
583 "abs r0.x, r0\n"
584 "add r0.x, r0, r0.y\n"
585 "add r0.x, r0, -r0.w\n"
586 "cmp r3.y, r0.x, c4.z, c4.x\n"
587 "max r0.y, r6, r1\n"
588 "max r0.z, r7.y, r0.y\n"
589 "max r0.y, r9, r8\n"
590 "max r0.y, r0, r0.z\n"
591 "min r0.z, r6.y, r1.y\n"
592 "min r0.w, r7.y, r0.z\n"
593 "min r0.z, r9.y, r8.y\n"
594 "min r0.z, r0, r0.w\n"
595 "mul r3.x, r0.y, c2\n"
596 "abs_pp r0.x, r3.y\n"
597 "add r4.y, r0, -r0.z\n"
598 "max r0.w, r3.x, c3.x\n"
599 "add r4.z, r4.y, -r0.w\n"
600 "cmp_pp r4.w, r4.z, c4.z, c4.x\n"
601 "mul_pp r5.w, r4, r3.y\n"
602 "cmp_pp r0.y, -r0.x, c4.z, c4.x\n"
603 "mul_pp r5.z, r4.w, r0.y\n"
604 "cmp_pp r3.x, -r0, c4, c4.z\n"
605 "cmp r6.w, -r5.z, r6.y, r7.y\n"
606 "cmp r7.w, -r5.z, r9.y, r8.y\n"
607 "add r0.z, -r1.y, r6.w\n"
608 "add r0.y, -r1, r7.w\n"
609 "abs r9.z, r0\n"
610 "abs r7.y, r0\n"
611 "add r0.y, r7, -r9.z\n"
612 "cmp r0.y, r0, c4.z, c4.x\n"
613 "max r7.y, r7, r9.z\n"
614 "mul_pp r0.z, r4.w, r0.y\n"
615 "cmp r0.w, -r5, c0.x, c0.y\n"
616 "cmp r6.x, -r0.z, r0.w, -r0.w\n"
617 "mov r0.z, c0.y\n"
618 "cmp r6.y, -r5.z, c4.x, r0.z\n"
619 "mad r0.w, r6.x, c5.y, t0.y\n"
620 "cmp r0.z, -r5.w, t0.y, r0.w\n"
621 "add r8.z, r0, r6.y\n"
622 "add r7.z, r0, -r6.y\n"
623 "mov r9.y, r7.z\n"
624 "mov r8.y, r8.z\n"
625 "mad r0.w, r6.x, c5.y, t0.x\n"
626 "mov r0.x, c0\n"
627 "mul_pp r3.x, r4.w, r3\n"
628 "cmp r6.z, -r3.x, c4.x, r0.x\n"
629 "cmp r0.x, -r5.z, t0, r0.w\n"
630 "add r9.x, r0, -r6.z\n"
631 "texld r3, r9, s0\n"
632 "add r8.x, r0, r6.z\n"
633 "abs_pp r3.x, r0.y\n"
634 "texld r0, r8, s0\n"
635 "cmp_pp r0.x, -r3, c4.z, c4\n"
636 "add r0.w, r1.y, r6\n"
637 "add r0.z, r1.y, r7.w\n"
638 "mul_pp r0.x, r4.w, r0\n"
639 "cmp r6.w, -r0.x, r0.z, r0\n"
640 "mad r7.w, -r6, c5.y, r0.y\n"
641 "mad r8.w, -r6, c5.y, r3.y\n"
642 "abs r0.y, r7.w\n"
643 "abs r0.x, r8.w\n"
644 "mad r0.x, -r7.y, c5.z, r0\n"
645 "mad r0.y, -r7, c5.z, r0\n"
646 "cmp r0.x, r0, c4.z, c4\n"
647 "abs_pp r0.x, r0\n"
648 "cmp_pp r9.z, -r0.x, c4, c4.x\n"
649 "cmp r0.y, r0, c4.z, c4.x\n"
650 "abs_pp r0.y, r0\n"
651 "cmp_pp r9.w, -r0.y, c4.z, c4.x\n"
652 "mul_pp r0.x, r4.w, r9.z\n"
653 "mad r0.y, -r6, c5.w, r7.z\n"
654 "cmp r7.z, -r0.x, r7, r0.y\n"
655 "mad r0.z, -r6, c5.w, r9.x\n"
656 "cmp r9.x, -r0, r9, r0.z\n"
657 "mov r9.y, r7.z\n"
658 "texld r3, r9, s0\n"
659 "add_pp_sat r3.z, r9, r9.w\n"
660 "mul_pp r0.x, r4.w, r9.w\n"
661 "mad r0.y, r6, c5.w, r8.z\n"
662 "cmp r3.x, -r0, r8.z, r0.y\n"
663 "mad r0.z, r6, c5.w, r8.x\n"
664 "mul_pp r8.z, r4.w, r3\n"
665 "cmp r8.x, -r0, r8, r0.z\n"
666 "mov r8.y, r3.x\n"
667 "texld r0, r8, s0\n"
668 "mul_pp r0.w, r8.z, r9\n"
669 "cmp r3.z, -r0.w, r7.w, r0.y\n"
670 "mul_pp r0.x, r8.z, r9.z\n"
671 "cmp r0.y, -r0.x, r8.w, r3\n"
672 "mad r0.z, -r6.w, c5.y, r0.y\n"
673 "cmp r8.w, -r0.x, r0.y, r0.z\n"
674 "mad r3.y, -r6.w, c5, r3.z\n"
675 "cmp r9.w, -r0, r3.z, r3.y\n"
676 "abs r0.y, r9.w\n"
677 "abs r0.x, r8.w\n"
678 "mad r0.y, -r7, c5.z, r0\n"
679 "mad r0.x, -r7.y, c5.z, r0\n"
680 "cmp r0.y, r0, c4.z, c4.x\n"
681 "abs_pp r0.y, r0\n"
682 "cmp_pp r10.x, -r0.y, c4.z, c4\n"
683 "cmp r0.x, r0, c4.z, c4\n"
684 "abs_pp r0.x, r0\n"
685 "cmp_pp r9.z, -r0.x, c4, c4.x\n"
686 "mul_pp r0.x, r8.z, r10\n"
687 "mad r0.y, r6, c5.x, r3.x\n"
688 "cmp r7.w, -r0.x, r3.x, r0.y\n"
689 "mad r0.z, r6, c5.x, r8.x\n"
690 "cmp r8.x, -r0, r8, r0.z\n"
691 "mov r8.y, r7.w\n"
692 "texld r0, r8, s0\n"
693 "mul_pp r0.w, r8.z, r9.z\n"
694 "mad r3.x, -r6.z, c5, r9\n"
695 "mad r0.x, -r6.y, c5, r7.z\n"
696 "cmp r0.x, -r0.w, r7.z, r0\n"
697 "add_pp_sat r0.z, r9, r10.x\n"
698 "mul_pp r7.z, r8, r0\n"
699 "cmp r9.x, -r0.w, r9, r3\n"
700 "mov r9.y, r0.x\n"
701 "texld r3, r9, s0\n"
702 "mul_pp r0.z, r7, r9\n"
703 "cmp r0.w, -r0.z, r8, r3.y\n"
704 "mul_pp r3.x, r7.z, r10\n"
705 "cmp r3.y, -r3.x, r9.w, r0\n"
706 "mad r0.y, -r6.w, c5, r0.w\n"
707 "cmp r8.z, -r0, r0.w, r0.y\n"
708 "mad r3.z, -r6.w, c5.y, r3.y\n"
709 "cmp r9.z, -r3.x, r3.y, r3\n"
710 "abs r0.y, r8.z\n"
711 "abs r0.z, r9\n"
712 "mad r0.y, -r7, c5.z, r0\n"
713 "mad r0.z, -r7.y, c5, r0\n"
714 "cmp r0.y, r0, c4.z, c4.x\n"
715 "abs_pp r0.y, r0\n"
716 "cmp_pp r8.w, -r0.y, c4.z, c4.x\n"
717 "cmp r0.z, r0, c4, c4.x\n"
718 "abs_pp r0.z, r0\n"
719 "cmp_pp r9.w, -r0.z, c4.z, c4.x\n"
720 "mul_pp r0.y, r7.z, r8.w\n"
721 "mad r0.z, -r6.y, c6.x, r0.x\n"
722 "cmp r10.x, -r0.y, r0, r0.z\n"
723 "mad r0.w, -r6.z, c6.x, r9.x\n"
724 "cmp r9.x, -r0.y, r9, r0.w\n"
725 "mov r9.y, r10.x\n"
726 "texld r3, r9, s0\n"
727 "mul_pp r0.x, r7.z, r9.w\n"
728 "mad r0.z, r6, c6.x, r8.x\n"
729 "mad r0.y, r6, c6.x, r7.w\n"
730 "cmp r3.x, -r0, r7.w, r0.y\n"
731 "cmp r8.x, -r0, r8, r0.z\n"
732 "mov r8.y, r3.x\n"
733 "texld r0, r8, s0\n"
734 "add_pp_sat r3.z, r8.w, r9.w\n"
735 "mul_pp r0.x, r7.z, r3.z\n"
736 "mul_pp r3.z, r0.x, r9.w\n"
737 "cmp r0.y, -r3.z, r9.z, r0\n"
738 "mul_pp r0.z, r0.x, r8.w\n"
739 "cmp r0.w, -r0.z, r8.z, r3.y\n"
740 "mad r3.w, -r6, c5.y, r0.y\n"
741 "cmp r0.y, -r3.z, r0, r3.w\n"
742 "mad r3.y, -r6.w, c5, r0.w\n"
743 "cmp r0.z, -r0, r0.w, r3.y\n"
744 "abs r3.y, r0\n"
745 "abs r0.w, r0.z\n"
746 "mad r3.y, -r7, c5.z, r3\n"
747 "mad r0.w, -r7.y, c5.z, r0\n"
748 "cmp r3.y, r3, c4.z, c4.x\n"
749 "abs_pp r3.y, r3\n"
750 "cmp r0.w, r0, c4.z, c4.x\n"
751 "cmp_pp r3.z, -r3.y, c4, c4.x\n"
752 "abs_pp r0.w, r0\n"
753 "cmp_pp r3.y, -r0.w, c4.z, c4.x\n"
754 "mul_pp r0.w, r0.x, r3.z\n"
755 "mul_pp r0.x, r0, r3.y\n"
756 "mad r3.w, r6.y, c6.y, r3.x\n"
757 "cmp r3.x, -r0.w, r3, r3.w\n"
758 "mad r3.z, r6, c6.y, r8.x\n"
759 "cmp r0.w, -r0, r8.x, r3.z\n"
760 "mad r3.y, -r6, c6, r10.x\n"
761 "cmp r3.y, -r0.x, r10.x, r3\n"
762 "add r3.x, -t0.y, r3\n"
763 "add r0.w, -t0.x, r0\n"
764 "cmp r0.w, -r5.z, r0, r3.x\n"
765 "mad r3.x, -r6.z, c6.y, r9\n"
766 "cmp r0.x, -r0, r9, r3\n"
767 "add r3.x, t0.y, -r3.y\n"
768 "add r0.x, t0, -r0\n"
769 "cmp r0.x, -r5.z, r0, r3\n"
770 "add r3.x, r0, -r0.w\n"
771 "add r3.y, r0.x, r0.w\n"
772 "cmp r3.x, r3, c4, c4.z\n"
773 "abs_pp r3.x, r3\n"
774 "min r0.x, r0, r0.w\n"
775 "cmp_pp r3.x, -r3, c4.z, c4\n"
776 "mul_pp r0.w, r4, r3.x\n"
777 "rcp r3.y, r3.y\n"
778 "mad r0.x, r0, -r3.y, c5.y\n"
779 "cmp r3.y, r0, c4.x, c4.z\n"
780 "mad r3.x, -r6.w, c5.y, r1.y\n"
781 "cmp r3.x, r3, c4, c4.z\n"
782 "cmp r0.y, r0.z, c4.x, c4.z\n"
783 "add_pp r0.z, -r3.x, r3.y\n"
784 "add_pp r0.y, r0, -r3.x\n"
785 "abs_pp r0.y, r0\n"
786 "abs_pp r0.z, r0\n"
787 "cmp_pp r0.z, -r0, c4.x, c4\n"
788 "cmp_pp r0.y, -r0, c4.x, c4.z\n"
789 "cmp_pp r0.y, -r0.w, r0, r0.z\n"
790 "abs_pp r0.y, r0\n"
791 "cmp_pp r0.y, -r0, c4.z, c4.x\n"
792 "mul_pp r0.y, r4.w, r0\n"
793 "rcp r0.w, r4.y\n"
794 "cmp r0.x, -r0.y, r0, c4\n"
795 "add r3.y, r4.x, r5\n"
796 "add r3.x, r5, r7\n"
797 "mad r3.x, r3, c5, r3.y\n"
798 "mad r0.z, r3.x, c6, -r1.y\n"
799 "abs r0.z, r0\n"
800 "mul_sat r0.z, r0, r0.w\n"
801 "mul r0.w, r0.z, r0.z\n"
802 "mad r0.z, r0, c7.x, c7.y\n"
803 "mul r0.z, r0, r0.w\n"
804 "mul r0.z, r0, r0\n"
805 "mul r0.z, r0, c1.x\n"
806 "max r0.x, r0, r0.z\n"
807 "mad r0.y, r0.x, r6.x, t0\n"
808 "mad r0.z, r0.x, r6.x, t0.x\n"
809 "cmp r0.x, -r5.z, t0, r0.z\n"
810 "cmp r0.y, -r5.w, t0, r0\n"
811 "texld r0, r0, s0\n"
812 "mov r0.w, r1.y\n"
813 "cmp r1, r4.z, r2, r1\n"
814 "cmp r0, -r4.w, r1, r0\n"
815 "mov oC0, r0\n";
817 const char *a_ps_2_0_ps3 =
818 "ps_2_0\n"
819 // cgc version 3.1.0013, build date Apr 18 2012
820 // command line args: -profile ps_2_0 -O3 -fastmath -fastprecision
821 // source file: fxaa_pp.cg
822 //vendor NVIDIA Corporation
823 //version 3.1.0.13
824 //profile ps_2_0
825 //program fxaa_pp
826 //semantic fxaa_pp.fxaaConsoleRcpFrameOpt
827 //semantic fxaa_pp.fxaaConsoleRcpFrameOpt2
828 //semantic fxaa_pp.nlTex0 : TEX0
829 //var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1
830 //var float4 fxaaConsolePosPos : $vin.TEXCOORD1 : TEX1 : 1 : 1
831 //var float4 fxaaConsoleRcpFrameOpt : : c[0] : 2 : 1
832 //var float4 fxaaConsoleRcpFrameOpt2 : : c[1] : 3 : 1
833 //var sampler2D nlTex0 : TEX0 : texunit 0 : 4 : 1
834 //var float4 oCol : $vout.COLOR : COL : 5 : 1
835 //const c[2] = 0.001953125 0.125 2 -2
836 //const c[3] = 0.5 0 1
837 "dcl_2d s0\n"
838 "def c2, 0.00195313, 0.12500000, 2.00000000, -2.00000000\n"
839 "def c3, 0.50000000, 0.00000000, 1.00000000, 0\n"
840 "dcl t1\n"
841 "dcl t0.xy\n"
842 "texld r5, t1, s0\n"
843 "mov r1.y, t1.w\n"
844 "mov r1.x, t1.z\n"
845 "mov r2.xy, r1\n"
846 "mov r0.y, t1.w\n"
847 "mov r0.x, t1\n"
848 "mov r1.y, t1\n"
849 "mov r1.x, t1.z\n"
850 "texld r1, r1, s0\n"
851 "texld r0, r0, s0\n"
852 "texld r6, r2, s0\n"
853 "add r0.x, r1.w, c2\n"
854 "add r2.x, -r0, r0.w\n"
855 "add r1.x, r5.w, r2\n"
856 "add r2.z, r1.x, -r6.w\n"
857 "add r2.x, -r5.w, r2\n"
858 "add r2.x, r6.w, r2\n"
859 "mov r3.x, r2\n"
860 "mov r3.y, r2.z\n"
861 "mov r2.y, r2.z\n"
862 "mov r1.y, r2.z\n"
863 "mov r1.x, r2\n"
864 "mul r1.xy, r3, r1\n"
865 "add r1.x, r1, r1.y\n"
866 "rsq r1.x, r1.x\n"
867 "mul r4.xy, r1.x, r2\n"
868 "abs r2.x, r4.y\n"
869 "abs r1.x, r4\n"
870 "min r1.x, r1, r2\n"
871 "rcp r1.x, r1.x\n"
872 "mul r1.xy, r1.x, r4\n"
873 "mul r1.xy, r1, c2.y\n"
874 "min r1.xy, r1, c2.z\n"
875 "max r2.xy, r1, c2.w\n"
876 "mov r1.y, c1.w\n"
877 "mov r1.x, c1.z\n"
878 "mad r3.xy, r2, r1, t0\n"
879 "mov r1.y, c1.w\n"
880 "mov r1.x, c1.z\n"
881 "mad r5.xy, -r2, r1, t0\n"
882 "mov r1.y, c0.w\n"
883 "mov r1.x, c0.z\n"
884 "mad r2.xy, -r4, r1, t0\n"
885 "mov r1.y, c0.w\n"
886 "mov r1.x, c0.z\n"
887 "mad r1.xy, r4, r1, t0\n"
888 "texld r4, r5, s0\n"
889 "texld r3, r3, s0\n"
890 "texld r1, r1, s0\n"
891 "texld r2, r2, s0\n"
892 "add r1, r2, r1\n"
893 "mul r2, r1, c3.x\n"
894 "add r1, r4, r3\n"
895 "max r3.x, r0, r6.w\n"
896 "mad r1, r1, c3.x, r2\n"
897 "mul r4, r1, c3.x\n"
898 "max r1.x, r0.w, r5.w\n"
899 "max r1.x, r1, r3\n"
900 "add r1.x, -r4.w, r1\n"
901 "min r3.x, r0.w, r5.w\n"
902 "min r0.x, r0, r6.w\n"
903 "min r0.x, r3, r0\n"
904 "add r0.x, r4.w, -r0\n"
905 "cmp r1.x, r1, c3.y, c3.z\n"
906 "cmp r0.x, r0, c3.y, c3.z\n"
907 "add_pp_sat r0.x, r0, r1\n"
908 "cmp r0, -r0.x, r4, r2\n"
909 "mov oC0, r0\n";
911 const char *a_ps_2_0_earlyexit =
912 "ps_2_x\n"
913 // cgc version 3.1.0013, build date Apr 18 2012
914 // command line args: -profile ps_2_x
915 // source file: fxaa_fp.cg
916 //vendor NVIDIA Corporation
917 //version 3.1.0.13
918 //profile ps_2_x
919 //program fxaa_fp
920 //semantic fxaa_fp.fxaaConsoleRcpFrameOpt
921 //semantic fxaa_fp.fxaaConsoleRcpFrameOpt2
922 //semantic fxaa_fp.nlTex0 : TEX0
923 //var float2 pos : $vin.TEXCOORD0 : TEX0 : 0 : 1
924 //var float4 fxaaConsolePosPos : $vin.TEXCOORD1 : TEX1 : 1 : 1
925 //var float4 fxaaConsoleRcpFrameOpt : : c[0] : 2 : 1
926 //var float4 fxaaConsoleRcpFrameOpt2 : : c[1] : 3 : 1
927 //var sampler2D nlTex0 : TEX0 : texunit 0 : 4 : 1
928 //var float4 oCol : $vout.COLOR : COL : 5 : 1
929 //const c[2] = 0.001953125 0 0.125 2
930 //const c[3] = -2 0.5 0 1
931 //const c[4] = 8
932 "dcl_2d s0\n"
933 "def c2, 0.00195313, 0.00000000, 0.12500000, 2.00000000\n"
934 "def c3, -2.00000000, 0.50000000, 0.00000000, 1.00000000\n"
935 "def c4, 8.00000000, 0, 0, 0\n"
936 "dcl t1\n"
937 "dcl t0.xy\n"
938 "mov r0.xy, t1.zyzw\n"
939 "texld r0, r0, s0\n"
940 "mov r0.xy, t1.xwzw\n"
941 "texld r5, t1, s0\n"
942 "texld r4, r0, s0\n"
943 "add r4.x, r0.w, c2\n"
944 "mov r0.xy, t1.zwzw\n"
945 "texld r3, r0, s0\n"
946 "add r0.w, r4, -r4.x\n"
947 "add r0.x, r5.w, r0.w\n"
948 "add r0.z, -r3.w, r0.x\n"
949 "add r0.x, -r5.w, r0.w\n"
950 "add r0.x, r3.w, r0\n"
951 "mov r0.y, c2\n"
952 "dp3 r0.y, r0, r0\n"
953 "rsq r0.y, r0.y\n"
954 "mul r0.zw, r0.y, r0.xyxz\n"
955 "mad r1.xy, -r0.zwzw, c0.zwzw, t0\n"
956 "texld r1, r1, s0\n"
957 "abs r0.y, r0.w\n"
958 "abs r0.x, r0.z\n"
959 "min r0.x, r0, r0.y\n"
960 "rcp r0.x, r0.x\n"
961 "mul r0.xy, r0.x, r0.zwzw\n"
962 "mul r0.xy, r0, c2.z\n"
963 "min r2.xy, r0, c2.w\n"
964 "mad r0.xy, r0.zwzw, c0.zwzw, t0\n"
965 "texld r0, r0, s0\n"
966 "add r0, r1, r0\n"
967 "max r1.xy, r2, c3.x\n"
968 "mul r2, r0, c3.y\n"
969 "mad r0.xy, r1, c1.zwzw, t0\n"
970 "mad r1.xy, -r1, c1.zwzw, t0\n"
971 "texld r0, r0, s0\n"
972 "texld r1, r1, s0\n"
973 "add r0, r1, r0\n"
974 "mad r0, r0, c3.y, r2\n"
975 "mul r1, r0, c3.y\n"
976 "min r0.y, r4.x, r3.w\n"
977 "min r0.x, r5.w, r4.w\n"
978 "min r3.y, r0.x, r0\n"
979 "add r0.x, -r3.y, r1.w\n"
980 "max r0.z, r4.x, r3.w\n"
981 "max r0.y, r5.w, r4.w\n"
982 "max r3.x, r0.y, r0.z\n"
983 "cmp r3.z, r0.x, c3, c3.w\n"
984 "add r3.w, r3.x, -r1\n"
985 "cmp r3.w, r3, c3.z, c3\n"
986 "add_pp_sat r3.z, r3, r3.w\n"
987 "texld r0, t0, s0\n"
988 "min r3.w, r0, r3.y\n"
989 "max r3.y, r3.x, r0.w\n"
990 "cmp r1, -r3.z, r1, r2\n"
991 "add r3.y, r3, -r3.w\n"
992 "mad r2.x, r3.y, c4, -r3\n"
993 "cmp r0, r2.x, r1, r0\n"
994 "mov oC0, r0\n";