source: 2013/30/MiskaK/MW2(My Warfare 2)/MW2(My Warfare 2)/MW2(My Warfare 2)Content/resolveShadowsEffect.fx @ 4507

Revision 4507, 22.0 KB checked in by anlakane, 6 years ago (diff)

Talletus.

Line 
1// NEW NEW
2
3texture InputTexture;
4sampler inputSampler = sampler_state     
5{
6            Texture   = <InputTexture>;
7            MipFilter = Point;
8            MinFilter = Point;
9            MagFilter = Point;
10            AddressU  = Clamp;
11            AddressV  = Clamp;
12};
13
14texture ShadowMapTexture;
15sampler shadowMapSampler = sampler_state     
16{
17            Texture   = <ShadowMapTexture>;
18            MipFilter = Point;
19            MinFilter = Point;
20            MagFilter = Point;
21            AddressU  = Clamp;
22            AddressV  = Clamp;
23};
24
25float2 renderTargetSize;
26float2 lightRelativeZero;
27float2 shadowCasterMapPortion;
28float2 shadowCasterMapPixelSize;
29float renderTargetSizeDesired;
30float distanceMod;
31float size16bit = 65536;
32float range16bit = 65535;
33float unit16bit = 0.0000152587890625f;
34float range8bit = 255;
35float size8bit = 256;
36float unit8bit = 0.00390625f;
37
38struct VS_OUTPUT
39{
40    float4 Position  : POSITION;
41    float2 TexCoords  : TEXCOORD0;
42};
43
44VS_OUTPUT FullScreenVS( float3 InPos  : POSITION,
45                                                float2 InTex  : TEXCOORD0)
46{
47    VS_OUTPUT Out = (VS_OUTPUT)0;
48    // Offset the position by half a pixel to correctly align texels to pixels
49    Out.Position = float4(InPos,1) + 0.475f * float4(-1.0f/renderTargetSize.x, 1.0f/renderTargetSize.y, 0, 0);
50    Out.TexCoords = InTex;
51    return Out;
52}
53
54//float GetInputPixelAlpha(float2 TexCoord)
55//{
56        //float2 shadowCastersMapRelativeCoord = float2(((renderTargetSizeDesired * TexCoord.x) + lightRelativeZero.x) * shadowCasterMapPixelSize.x, ((renderTargetSizeDesired * TexCoord.y) + lightRelativeZero.y) * shadowCasterMapPixelSize.y);
57        //return tex2D(inputSampler, shadowCastersMapRelativeCoord).a;
58
59        //float2 shadowCastersMapRelativeCoord = float2(((renderTargetSizeDesired * TexCoord.x) + lightRelativeZero.x) * shadowCasterMapPixelSize.x, ((renderTargetSizeDesired * TexCoord.y) + lightRelativeZero.y) * shadowCasterMapPixelSize.y);
60        //return tex2D(inputSampler, shadowCastersMapRelativeCoord).a;
61        //return tex2D(inputSampler, TexCoord).a;
62//}
63
64
65float4 DistortAndComputeDistancesPS(float2 TexCoord  : TEXCOORD0) : COLOR0
66{
67        //translate u and v into [-1 , 1] domain
68        float u0 = TexCoord.x * 2.0f - 1.0f;
69        float v0 = TexCoord.y * 2.0f - 1.0f;
70         
71        //then, as u0 approaches 0 (the center), v should also approach 0
72        v0 = v0 * abs(u0);
73
74        //convert back from [-1,1] domain to [0,1] domain
75        v0 = (v0 + 1.0f) * 0.5f;
76
77        //we now have the coordinates for reading from the initial image
78        float2 newCoords = float2(TexCoord.x, v0);
79
80        //read for both horizontal and vertical direction and store them in separate channels
81
82        float2 shadowCastersMapRelativeCoord = float2((shadowCasterMapPortion.x * newCoords.x) + lightRelativeZero.x, (shadowCasterMapPortion.y * newCoords.y) + lightRelativeZero.y);
83        float horizontal = 1.0f - tex2D(inputSampler, shadowCastersMapRelativeCoord).r;
84        float distanceH = (horizontal>0.3f?length(newCoords - 0.5f):0.5f) * 2.0f;
85
86        shadowCastersMapRelativeCoord = float2((shadowCasterMapPortion.x * newCoords.y) + lightRelativeZero.x, (shadowCasterMapPortion.y * newCoords.x) + lightRelativeZero.y);
87        float vertical = 1.0f - tex2D(inputSampler, shadowCastersMapRelativeCoord).r;
88        float distanceV = (vertical>0.3f?length(newCoords - 0.5f):1.0f) * 2.0f;
89
90        float precision8bitH = distanceH % unit8bit;
91        float precision8bitV = distanceV % unit8bit;
92
93        return float4(distanceV - precision8bitV,precision8bitV * 100,distanceH - precision8bitH,precision8bitH * 100);
94}
95
96float GetShadowDistanceH(float2 TexCoord, float displacementV)
97{
98        float u = TexCoord.x;
99        float v = TexCoord.y;
100
101        u = abs(u-0.5f) * 2;
102        v = v * 2 - 1;
103        float v0 = v/u;
104        v0+=displacementV;
105        v0 = (v0 + 1) / 2;
106               
107        float2 newCoords = float2(TexCoord.x,v0);
108        //horizontal info was stored in the Red component
109        float4 color = tex2D(shadowMapSampler, newCoords);
110
111        return color.b + (color.a * 0.01f);
112}
113
114float GetShadowDistanceV(float2 TexCoord, float displacementV)
115{
116        float u = TexCoord.y;
117        float v = TexCoord.x;
118               
119        u = abs(u-0.5f) * 2;
120        v = v * 2 - 1;
121        float v0 = v/u;
122        v0+=displacementV;
123        v0 = (v0 + 1) / 2;
124               
125        float2 newCoords = float2(TexCoord.y,v0);
126        //vertical info was stored in the Green component
127        float4 color= tex2D(shadowMapSampler, newCoords).rgba;
128
129        return color.r + (color.g * 0.01f);
130}
131
132float4 DrawShadowsNoAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
133{
134        float2 newCoord = TexCoord - 0.5f;
135
136        if (newCoord.x < -distanceMod || newCoord.x > distanceMod || newCoord.y < -distanceMod || newCoord.y > distanceMod)
137                return 0;
138
139        // distance of this pixel from the center
140        double distance = length(newCoord);
141
142        //distance stored in the shadow map
143        float shadowMapDistance;
144
145        //coords in [-1,1]
146        float nY = 2.0f*(newCoord.y);
147        float nX = 2.0f*(newCoord.x);
148
149        //we use these to determine which quadrant we are in
150        if(abs(nY)<abs(nX))
151        {
152                shadowMapDistance = GetShadowDistanceH(TexCoord,0);
153        }
154        else
155        {
156                shadowMapDistance = GetShadowDistanceV(TexCoord,0);
157        }
158
159        //if distance to this pixel is lower than distance from shadowMap,
160        //then we are not in shadow
161   
162        //float normilizedDistance = floor(range16bit * distance * 2.0f);
163        //float normalizedShadowMapDistance = floor(range16bit * shadowMapDistance);
164
165        //float light = normilizedDistance < normalizedShadowMapDistance ? 1:0;
166
167        float light = distance * 2.0f < shadowMapDistance ? 1:0;
168
169        float4 result = light;
170        result.a = 1;
171        return result;
172}
173
174float4 DrawShadowsNoAttenuationPreBlurPS(float2 TexCoord  : TEXCOORD0) : COLOR0
175{
176        float2 newCoord = TexCoord - 0.5f;
177
178        if (newCoord.x < -distanceMod || newCoord.x > distanceMod || newCoord.y < -distanceMod || newCoord.y > distanceMod)
179                return 0;
180
181      // distance of this pixel from the center
182      float distance = length(newCoord);
183
184      //distance stored in the shadow map
185      float shadowMapDistance;
186
187      //coords in [-1,1]
188      float nY = 2.0f*(newCoord.y);
189      float nX = 2.0f*(newCoord.x);
190
191      //we use these to determine which quadrant we are in
192      if(abs(nY)<abs(nX))
193      {
194        shadowMapDistance = GetShadowDistanceH(TexCoord,0);
195      }
196      else
197      {
198        shadowMapDistance = GetShadowDistanceV(TexCoord,0);
199      }
200
201      //if distance to this pixel is lower than distance from shadowMap,
202      //then we are not in shadow
203        float light = distance * 2.0f < shadowMapDistance ? 1:0;
204
205      float4 result = light;
206      result.b = length(TexCoord - 0.5f) * 2;
207      result.a = 1;
208      return result;
209}
210
211float4 DrawShadowsCurveAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
212{
213        if (distanceMod == 0)
214                return 0;
215
216        float2 newCoords = TexCoord - 0.5f;
217
218        // distance of this pixel from the center
219        float distance = length(newCoords);
220
221        //distance stored in the shadow map
222        float shadowMapDistance;
223
224        //coords in [-1,1]
225        float nY = 2.0f*(newCoords.y);
226        float nX = 2.0f*(newCoords.x);
227
228        //we use these to determine which quadrant we are in
229        if(abs(nY)<abs(nX))
230        {
231                shadowMapDistance = GetShadowDistanceH(TexCoord,0);
232        }
233        else
234        {
235                shadowMapDistance = GetShadowDistanceV(TexCoord,0);
236        }
237
238        //if distance to this pixel is lower than distance from shadowMap,
239        //then we are not in shadow
240        float light = distance * 2.0f< shadowMapDistance ? 1:0;
241
242        //float d = 1.5f * length(TexCoord - 0.5f);
243        //float attenuation = pow( saturate(1.0f - d),1.0f);
244         
245         distance /= distanceMod;
246
247        float4 result = light * (1 - (4 * (distance * distance)));
248        result.a = 1;
249        return result;
250}
251
252
253float4 DrawShadowsCircleCutPS(float2 TexCoord  : TEXCOORD0) : COLOR0
254{
255        float2 newCoords = TexCoord - 0.5f;
256
257        // distance of this pixel from the center
258        float distance = length(newCoords);
259
260        //distance stored in the shadow map
261        float shadowMapDistance;
262
263        //coords in [-1,1]
264        float nY = 2.0f*(newCoords.y);
265        float nX = 2.0f*(newCoords.x);
266
267        float light = 0;
268
269        if (distance <= 0.5f && distance < distanceMod)
270        {
271                //we use these to determine which quadrant we are in
272                if(abs(nY)<abs(nX))
273                {
274                        shadowMapDistance = GetShadowDistanceH(TexCoord,0);
275                }
276                else
277                {
278                        shadowMapDistance = GetShadowDistanceV(TexCoord,0);
279                }
280
281                //if distance to this pixel is lower than distance from shadowMap,
282                //then we are not in shadow
283                light = distance < shadowMapDistance ? 1:0;
284        }
285
286        float4 result = light;
287        result.a = 1;
288        return result;
289}
290
291float4 DrawShadowsLinearAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
292{
293        if (distanceMod == 0)
294                return 0;
295
296        float2 newCoords = TexCoord - 0.5f;
297
298        // distance of this pixel from the center
299        float distance = length(newCoords);
300
301        //distance stored in the shadow map
302        float shadowMapDistance;
303
304        //coords in [-1,1]
305        float nY = 2.0f*(newCoords.y);
306        float nX = 2.0f*(newCoords.x);
307
308        //we use these to determine which quadrant we are in
309        if(abs(nY)<abs(nX))
310        {
311                shadowMapDistance = GetShadowDistanceH(TexCoord,0);
312        }
313        else
314        {
315                shadowMapDistance = GetShadowDistanceV(TexCoord,0);
316        }
317
318        //if distance to this pixel is lower than distance from shadowMap,
319        //then we are not in shadow
320        float light = distance * 2.0f < shadowMapDistance ? 1:0;
321
322        float4 result = light;
323        result.a = 1 - ((distance * 2) / distanceMod);
324        return result;
325}
326
327static const float minBlur = 0.0f;
328static const float maxBlur = 5.0f;
329static const int g_cKernelSize_High = 13;
330static const float2 OffsetAndWeight_High[g_cKernelSize_High] =
331{
332    { -6, 0.002216 },
333    { -5, 0.008764 },
334    { -4, 0.026995 },
335    { -3, 0.064759 },
336    { -2, 0.120985 },
337    { -1, 0.176033 },
338    {  0, 0.199471 },
339    {  1, 0.176033 },
340    {  2, 0.120985 },
341    {  3, 0.064759 },
342    {  4, 0.026995 },
343    {  5, 0.008764 },
344    {  6, 0.002216 },
345};
346
347static const int g_cKernelSize_Mid = 9;
348static const float2 OffsetAndWeight_Mid[g_cKernelSize_Mid] =
349{
350    { -4, 0.01 },
351    { -3, 0.02 },
352    { -2, 0.05 },
353    { -1, 0.1525 },
354    {  0, 0.525 },
355    {  1, 0.1525 },
356    {  2, 0.05 },
357    {  3, 0.02 },
358    {  4, 0.01 },
359};
360
361
362static const int g_cKernelSize_Low = 5;
363static const float2 OffsetAndWeight_Low[g_cKernelSize_Low] =
364{
365    { -2, 0.05 },
366    { -1, 0.1 },
367    {  0, 0.7 },
368    {  1, 0.1 },
369    {  2, 0.05 },
370};
371
372float4 BlurHorizontallyLowPS(float2 TexCoord  : TEXCOORD0) : COLOR0
373{
374          float sum=0;
375          float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
376
377      for (int i = 0; i < g_cKernelSize_Low; i++)
378          {   
379                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Low[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(1,0) ).r * OffsetAndWeight_Low[i].y;
380      }
381         
382          float4 result = sum;
383          result.b = distance * 2;
384          result.a = 1;
385      return result;
386}
387
388float4 BlurHorizontallyMidPS(float2 TexCoord  : TEXCOORD0) : COLOR0
389{
390          float sum=0;
391          float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
392         
393      for (int i = 0; i < g_cKernelSize_Mid; i++)
394          {   
395                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Mid[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(1,0) ).r * OffsetAndWeight_Mid[i].y;
396      }
397         
398          float4 result = sum;
399          result.b = distance * 2;
400          result.a = 1;
401      return result;
402}
403
404float4 BlurHorizontallyHighPS(float2 TexCoord  : TEXCOORD0) : COLOR0
405{
406          float sum=0;
407          float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
408         
409      for (int i = 0; i < g_cKernelSize_High; i++)
410          {   
411                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_High[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(1,0) ).r * OffsetAndWeight_High[i].y;
412      }
413         
414          float4 result = sum;
415          result.b = distance * 2;
416          result.a = 1;
417      return result;
418}
419
420float4 BlurVerticallyLowNoAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
421{
422        float sum=0;
423        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
424
425        for (int i = 0; i < g_cKernelSize_Low; i++)
426        {   
427                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Low[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Low[i].y;
428        }
429         
430        float4 result = sum;
431        result.a = 1;
432        return result;
433}
434
435float4 BlurVerticallyMidNoAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
436{
437        float sum=0;
438        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
439
440        for (int i = 0; i < g_cKernelSize_Mid; i++)
441        {   
442                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Mid[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Mid[i].y;
443        }
444         
445        float4 result = sum;
446        result.a = 1;
447        return result;
448}
449
450float4 BlurVerticallyHighNoAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
451{
452        float sum=0;
453        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
454
455        for (int i = 0; i < g_cKernelSize_High; i++)
456        {   
457                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_High[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_High[i].y;
458        }
459         
460        float4 result = sum;
461        result.a = 1;
462        return result;
463}
464
465float4 BlurVerticallyLowLinearAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
466{
467        if (distanceMod == 0)
468                return 0;
469
470        float sum=0;
471        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
472         
473        if (distance >= 0.5f)
474                return 0;
475
476        for (int i = 0; i < g_cKernelSize_Low; i++)
477        {   
478                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Low[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Low[i].y;
479        }
480         
481        float4 result = sum;
482        result.a = 1 - ((distance * 2) / distanceMod);
483        return result;
484}
485
486float4 BlurVerticallyMidLinearAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
487{
488        if (distanceMod == 0)
489                return 0;
490
491        float sum=0;
492        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
493         
494        if (distance >= 0.5f)
495                return 0;
496
497        for (int i = 0; i < g_cKernelSize_Mid; i++)
498        {   
499                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Mid[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Mid[i].y;
500        }
501         
502        float4 result = sum;
503        result.a = 1 - ((distance * 2) / distanceMod);
504        return result;
505}
506
507float4 BlurVerticallyHighLinearAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
508{
509        if (distanceMod == 0)
510                return 0;
511
512        float sum=0;
513        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
514         
515        if (distance >= 0.5f)
516                return 0;
517
518        for (int i = 0; i < g_cKernelSize_High; i++)
519        {   
520                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_High[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_High[i].y;
521        }
522         
523        float4 result = sum;
524        result.a = 1 - ((distance * 2) / distanceMod);
525        return result;
526}
527
528float4 BlurVerticallyLowCurveAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
529{
530        if (distanceMod == 0)
531                return 0;
532
533        float sum=0;
534        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
535         
536        for (int i = 0; i < g_cKernelSize_Low; i++)
537        {   
538                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Low[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Low[i].y;
539        }
540         
541         distance /= distanceMod;
542         
543        float4 result = sum * (1 - (4 * (distance * distance)));
544        result.a = 1;
545        return result;
546}
547
548float4 BlurVerticallyMidCurveAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
549{
550        if (distanceMod == 0)
551                return 0;
552
553        float sum=0;
554        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
555         
556        for (int i = 0; i < g_cKernelSize_Mid; i++)
557        {   
558                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Mid[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Mid[i].y;
559        }
560         
561         distance /= distanceMod;
562         
563        float4 result = sum * (1 - (4 * (distance * distance)));
564        result.a = 1;
565        return result;
566}
567
568float4 BlurVerticallyHighCurveAttenuationPS(float2 TexCoord  : TEXCOORD0) : COLOR0
569{
570        if (distanceMod == 0)
571                return 0;
572
573        float sum=0;
574        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
575         
576        for (int i = 0; i < g_cKernelSize_High; i++)
577        {   
578                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_High[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_High[i].y;
579        }
580         
581         distance /= distanceMod;
582         
583        float4 result = sum * (1 - (4 * (distance * distance)));
584        result.a = 1;
585        return result;
586}
587
588float4 BlurVerticallyLowCircleCutPS(float2 TexCoord  : TEXCOORD0) : COLOR0
589{
590        float sum=0;
591        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
592         
593        if (distance >= 0.5f)
594                return 0;
595
596        for (int i = 0; i < g_cKernelSize_Low; i++)
597        {   
598                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Low[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Low[i].y;
599        }
600         
601        float4 result = sum;
602        result.a = 1;
603        return result;
604}
605
606float4 BlurVerticallyMidCircleCutPS(float2 TexCoord  : TEXCOORD0) : COLOR0
607{
608        float sum=0;
609        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
610         
611        if (distance >= 0.5f)
612                return 0;
613
614        for (int i = 0; i < g_cKernelSize_Mid; i++)
615        {   
616                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_Mid[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_Mid[i].y;
617        }
618         
619        float4 result = sum;
620        result.a = 1;
621        return result;
622}
623
624float4 BlurVerticallyHighCircleCutPS(float2 TexCoord  : TEXCOORD0) : COLOR0
625{
626        float sum=0;
627        float distance = tex2D( inputSampler, TexCoord).b * 0.5f;
628         
629        if (distance >= 0.5f)
630                return 0;
631
632        for (int i = 0; i < g_cKernelSize_High; i++)
633        {   
634                sum += tex2D( inputSampler, TexCoord + OffsetAndWeight_High[i].x * lerp(minBlur, maxBlur , distance)/renderTargetSize.x * float2(0,1) ).r * OffsetAndWeight_High[i].y;
635        }
636         
637        float4 result = sum;
638        result.a = 1;
639        return result;
640}
641
642technique DrawShadowsNoAttenuation
643{
644    pass P0
645    {         
646        VertexShader = compile vs_2_0 FullScreenVS();
647        PixelShader  = compile ps_2_0 DrawShadowsNoAttenuationPS();
648    }
649}
650
651technique DrawShadowsNoAttenuationPreBlur
652{
653    pass P0
654    {         
655        VertexShader = compile vs_2_0 FullScreenVS();
656        PixelShader  = compile ps_2_0 DrawShadowsNoAttenuationPreBlurPS();
657    }
658}
659
660technique DrawShadowsCircleCut
661{
662    pass P0
663    {         
664        VertexShader = compile vs_2_0 FullScreenVS();
665        PixelShader  = compile ps_2_0 DrawShadowsCircleCutPS();
666    }
667}
668
669technique DrawShadowsLinearAttenuation
670{
671    pass P0
672    {         
673        VertexShader = compile vs_2_0 FullScreenVS();
674        PixelShader  = compile ps_2_0 DrawShadowsLinearAttenuationPS();
675    }
676}
677
678technique DrawShadowsCurveAttenuation
679{
680    pass P0
681    {         
682        VertexShader = compile vs_2_0 FullScreenVS();
683        PixelShader  = compile ps_2_0 DrawShadowsCurveAttenuationPS();
684    }
685}
686
687technique BlurHorizontallyLow
688{
689    pass P0
690    {         
691        VertexShader = compile vs_2_0 FullScreenVS();
692        PixelShader  = compile ps_2_0 BlurHorizontallyLowPS();
693    }
694}
695
696technique BlurHorizontallyMid
697{
698    pass P0
699    {         
700        VertexShader = compile vs_2_0 FullScreenVS();
701        PixelShader  = compile ps_2_0 BlurHorizontallyMidPS();
702    }
703}
704
705technique BlurHorizontallyHigh
706{
707    pass P0
708    {         
709        VertexShader = compile vs_2_0 FullScreenVS();
710        PixelShader  = compile ps_2_0 BlurHorizontallyHighPS();
711    }
712}
713
714technique BlurVerticallyLowNoAttenuation
715{
716    pass P0
717    {         
718        VertexShader = compile vs_2_0 FullScreenVS();
719        PixelShader  = compile ps_2_0 BlurVerticallyLowNoAttenuationPS();
720    }
721}
722
723technique BlurVerticallyMidNoAttenuation
724{
725    pass P0
726    {         
727        VertexShader = compile vs_2_0 FullScreenVS();
728        PixelShader  = compile ps_2_0 BlurVerticallyMidNoAttenuationPS();
729    }
730}
731
732technique BlurVerticallyHighNoAttenuation
733{
734    pass P0
735    {         
736        VertexShader = compile vs_2_0 FullScreenVS();
737        PixelShader  = compile ps_2_0 BlurVerticallyHighNoAttenuationPS();
738    }
739}
740
741technique BlurVerticallyLowLinearAttenuation
742{
743    pass P0
744    {         
745        VertexShader = compile vs_2_0 FullScreenVS();
746        PixelShader  = compile ps_2_0 BlurVerticallyLowLinearAttenuationPS();
747    }
748}
749
750technique BlurVerticallyMidLinearAttenuation
751{
752    pass P0
753    {         
754        VertexShader = compile vs_2_0 FullScreenVS();
755        PixelShader  = compile ps_2_0 BlurVerticallyMidLinearAttenuationPS();
756    }
757}
758
759technique BlurVerticallyHighLinearAttenuation
760{
761    pass P0
762    {         
763        VertexShader = compile vs_2_0 FullScreenVS();
764        PixelShader  = compile ps_2_0 BlurVerticallyHighLinearAttenuationPS();
765    }
766}
767
768technique BlurVerticallyLowCurveAttenuation
769{
770    pass P0
771    {         
772        VertexShader = compile vs_2_0 FullScreenVS();
773        PixelShader  = compile ps_2_0 BlurVerticallyLowCurveAttenuationPS();
774    }
775}
776
777technique BlurVerticallyMidCurveAttenuation
778{
779    pass P0
780    {         
781        VertexShader = compile vs_2_0 FullScreenVS();
782        PixelShader  = compile ps_2_0 BlurVerticallyMidCurveAttenuationPS();
783    }
784}
785
786technique BlurVerticallyHighCurveAttenuation
787{
788    pass P0
789    {         
790        VertexShader = compile vs_2_0 FullScreenVS();
791        PixelShader  = compile ps_2_0 BlurVerticallyHighCurveAttenuationPS();
792    }
793}
794
795technique BlurVerticallyLowCircleCut
796{
797    pass P0
798    {         
799        VertexShader = compile vs_2_0 FullScreenVS();
800        PixelShader  = compile ps_2_0 BlurVerticallyLowCircleCutPS();
801    }
802}
803
804technique BlurVerticallyMidCircleCut
805{
806    pass P0
807    {         
808        VertexShader = compile vs_2_0 FullScreenVS();
809        PixelShader  = compile ps_2_0 BlurVerticallyMidCircleCutPS();
810    }
811}
812
813technique BlurVerticallyHighCircleCut
814{
815    pass P0
816    {         
817        VertexShader = compile vs_2_0 FullScreenVS();
818        PixelShader  = compile ps_2_0 BlurVerticallyHighCircleCutPS();
819    }
820}
821
822technique DistortAndComputeDistances
823{
824    pass P0
825    {         
826        VertexShader = compile vs_2_0 FullScreenVS();
827        PixelShader  = compile ps_2_0 DistortAndComputeDistancesPS();
828    }
829}
Note: See TracBrowser for help on using the repository browser.