source:
data/trunk/programs/Blur0_ps20.hlsl
@
11803
Last change on this file since 11803 was 7708, checked in by dafrick, 14 years ago | |
---|---|
|
|
File size: 598 bytes |
Rev | Line | |
---|---|---|
[5120] | 1 | sampler RT: register(s0); |
2 | // Simple blur filter | |
3 | ||
4 | float4 main(float2 texCoord: TEXCOORD0) : COLOR { | |
5 | ||
6 | float2 samples[12] = { | |
7 | -0.326212, -0.405805, | |
8 | -0.840144, -0.073580, | |
9 | -0.695914, 0.457137, | |
10 | -0.203345, 0.620716, | |
11 | 0.962340, -0.194983, | |
12 | 0.473434, -0.480026, | |
13 | 0.519456, 0.767022, | |
14 | 0.185461, -0.893124, | |
15 | 0.507431, 0.064425, | |
16 | 0.896420, 0.412458, | |
17 | -0.321940, -0.932615, | |
18 | -0.791559, -0.597705, | |
19 | }; | |
20 | ||
21 | float4 sum = tex2D(RT, texCoord); | |
22 | for (int i = 0; i < 12; i++){ | |
23 | sum += tex2D(RT, texCoord + 0.025 * samples[i]); | |
24 | } | |
25 | return sum / 13; | |
26 | ||
27 | } | |
28 | ||
29 | ||
30 | ||
31 |
Note: See TracBrowser
for help on using the repository browser.