Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sampler s0 : register(s0);
- float4 p1 : register(c1);
- #define px (p1[0])
- #define py (p1[1])
- static int wcount = 31;
- static float weights[] = {
- 0.01616028, 0.01838334, 0.02072716, 0.02316300, 0.02565602,
- 0.02816589, 0.03064766, 0.03305298, 0.03533162, 0.03743313,
- 0.03930867, 0.04091289, 0.04220574, 0.04315414, 0.04373338,
- 0.04392819, 0.04373338, 0.04315414, 0.04220574, 0.04091289,
- 0.03930867, 0.03743313, 0.03533162, 0.03305298, 0.03064766,
- 0.02816589, 0.02565602, 0.02316300, 0.02072716, 0.01838334,
- 0.01616028
- };
- float4 main(float2 tex : TEXCOORD0) : COLOR
- {
- float3 c0 = float3(0.0, 0.0, 0.0);
- for (int i = 0; i < wcount; i++)
- c0 += tex2D(s0, tex - float2((i - wcount/2) * 2.0 * px, 0.0)).rgb * weights[i];
- return float4(c0, 0.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement