Loadus

PandaFX.fx for ReShade v3.x

Nov 9th, 2018
671
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.     PandaFX version 2.2 for ReShade 3.4.1
  3.     by Jukka Korhonen aka Loadus ~ twitter.com/thatbonsaipanda
  4.     November 2018
  5.     jukka.korhonen@gmail.com
  6.    
  7.     Applies cinematic lens effects and color grading.
  8.     Free licence to copy, modify, tweak and publish but
  9.     if you can, give credit. Thanks. o/
  10.    
  11.     - jP
  12.  */
  13.  
  14. #include "ReShade.fxh"
  15.  
  16. // ------------------------------------
  17.  
  18. uniform float Blend_Amount <
  19.     ui_label = "Blend Amount";
  20.     ui_type = "drag";
  21.     ui_min = 0.0;
  22.     ui_max = 1.0;
  23.     ui_tooltip = "Blend the effect with the original image.";
  24. > = 1.0;
  25.  
  26. // ------------------------------------
  27.  
  28. uniform bool Enable_Diffusion <
  29.     ui_label = "Enable the lens diffusion effect";
  30.     ui_tooltip = "Enable a light diffusion that emulates the glare of a camera lens.";
  31. > = true;
  32.  
  33. uniform bool Enable_Bleach_Bypass <
  34.     ui_label = "Enable the 'Bleach Bypass' effect";
  35.     ui_tooltip = "Enable a cinematic contrast effect that emulates a bleach bypass on film. Used a lot in war movies and gives the image a grittier feel.";
  36. > = true;
  37.  
  38. uniform bool Enable_Dither <
  39.     ui_label = "Dither";
  40.     ui_tooltip = "Dither the final result.";
  41. > = true;
  42.  
  43.  
  44. // ------------------------------------
  45.  
  46. uniform float Contrast_R <
  47.     ui_label = "Contrast (Red)";
  48.     ui_type = "drag";
  49.     ui_min = 0.00001;
  50.     ui_max = 20.0;
  51.     ui_tooltip = "Apply contrast to red.";
  52. > = 2.2;
  53.  
  54. uniform float Contrast_G <
  55.     ui_label = "Contrast (Green)";
  56.     ui_type = "drag";
  57.     ui_min = 0.00001;
  58.     ui_max = 20.0;
  59.     ui_tooltip = "Apply contrast to green.";
  60. > = 2.0;
  61.  
  62. uniform float Contrast_B <
  63.     ui_label = "Contrast (Blue)";
  64.     ui_type = "drag";
  65.     ui_min = 0.00001;
  66.     ui_max = 20.0;
  67.     ui_tooltip = "Apply contrast to blue.";
  68. > = 2.0;
  69.  
  70. uniform float Gamma_R <
  71.     ui_label = "Gamma (Red)";
  72.     ui_type = "drag";
  73.     ui_min = 0.02;
  74.     ui_max = 5.0;
  75.     ui_tooltip = "Apply Gamma to red.";
  76. > = 1.0;
  77.  
  78. uniform float Gamma_G <
  79.     ui_label = "Gamma (Green)";
  80.     ui_type = "drag";
  81.     ui_min = 0.02;
  82.     ui_max = 5.0;
  83.     ui_tooltip = "Apply Gamma to green.";
  84. > = 1.0;
  85.  
  86. uniform float Gamma_B <
  87.     ui_label = "Gamma (Blue)";
  88.     ui_type = "drag";
  89.     ui_min = 0.02;
  90.     ui_max = 5.0;
  91.     ui_tooltip = "Apply Gamma to blue.";
  92. > = 1.0;
  93.  
  94. // ------------------------------------
  95.  
  96. uniform float Diffusion_1_Amount <
  97.     ui_label = "Diffusion 1 Amount";
  98.     ui_type = "drag";
  99.     ui_min = 0.0;
  100.     ui_max = 1.0;
  101.     ui_tooltip = "Adjust the amount of the first diffusion layer.";
  102. > = 0.5;
  103.  
  104. uniform float Diffusion_2_Amount <
  105.     ui_label = "Diffusion 2 Amount";
  106.     ui_type = "drag";
  107.     ui_min = 0.0;
  108.     ui_max = 1.0;
  109.     ui_tooltip = "Adjust the amount of the second diffusion layer.";
  110. > = 0.5;
  111.  
  112. uniform float Diffusion_3_Amount <
  113.     ui_label = "Diffusion 3 Amount";
  114.     ui_type = "drag";
  115.     ui_min = 0.0;
  116.     ui_max = 1.0;
  117.     ui_tooltip = "Adjust the amount of the third diffusion layer.";
  118. > = 0.5;
  119.  
  120. uniform float Diffusion_1_Radius <
  121.     ui_label = "Diffusion 1 Radius";
  122.     ui_type = "drag";
  123.     ui_min = 5.0;
  124.     ui_max = 20.0;
  125.     ui_tooltip = "Set the radius of the first diffusion layer.";
  126. > = 8.0;
  127.  
  128. uniform float Diffusion_2_Radius <
  129.     ui_label = "Diffusion 2 Radius";
  130.     ui_type = "drag";
  131.     ui_min = 5.0;
  132.     ui_max = 20.0;
  133.     ui_tooltip = "Set the radius of the second diffusion layer.";
  134. > = 8.0;
  135.  
  136. uniform float Diffusion_3_Radius <
  137.     ui_label = "Diffusion 3 Radius";
  138.     ui_type = "drag";
  139.     ui_min = 5.0;
  140.     ui_max = 20.0;
  141.     ui_tooltip = "Set the radius of the third diffusion layer.";
  142. > = 8.0;
  143.  
  144. uniform float Diffusion_1_Gamma <
  145.     ui_label = "Diffusion 1 Gamma";
  146.     ui_type = "drag";
  147.     ui_min = 0.02;
  148.     ui_max = 5.0;
  149.     ui_tooltip = "Apply Gamma to first diffusion layer.";
  150. > = 2.2;
  151.  
  152. uniform float Diffusion_2_Gamma <
  153.     ui_label = "Diffusion 2 Gamma";
  154.     ui_type = "drag";
  155.     ui_min = 0.02;
  156.     ui_max = 5.0;
  157.     ui_tooltip = "Apply Gamma to second diffusion layer.";
  158. > = 1.3;
  159.  
  160. uniform float Diffusion_3_Gamma <
  161.     ui_label = "Diffusion 3 Gamma";
  162.     ui_type = "drag";
  163.     ui_min = 0.02;
  164.     ui_max = 5.0;
  165.     ui_tooltip = "Apply Gamma to third diffusion layer.";
  166. > = 1.0;
  167.  
  168. // ------------------------------------
  169.  
  170. uniform float Bleach_Bypass_Amount <
  171.     ui_label = "Bleach Bypass Amount";
  172.     ui_type = "drag";
  173.     ui_min = 0.0;
  174.     ui_max = 1.0;
  175.     ui_tooltip = "Adjust the amount of the third diffusion layer.";
  176. > = 0.5;
  177.  
  178. // ------------------------------------
  179.  
  180. uniform float Dither_Amount <
  181.     ui_label = "Dither Amount";
  182.     ui_type = "drag";
  183.     ui_min = 0.0;
  184.     ui_max = 1.0;
  185.     ui_tooltip = "Adjust the amount of the dither on the diffusion layers (to smooth out banding).";
  186. > = 0.15;
  187.  
  188. // ------------------------------------
  189.  
  190. uniform float Diffusion_1_Desaturate <
  191.     ui_label = "Diffusion 1 desaturation";
  192.     ui_type = "drag";
  193.     ui_min = 0.0;
  194.     ui_max = 1.0;
  195.     ui_tooltip = "Adjust the saturation of the first diffusion layer.";
  196. > = 0.0;
  197.  
  198. uniform float Diffusion_2_Desaturate <
  199.     ui_label = "Diffusion 2 desaturation";
  200.     ui_type = "drag";
  201.     ui_min = 0.0;
  202.     ui_max = 1.0;
  203.     ui_tooltip = "Adjust the saturation of the second diffusion layer.";
  204. > = 0.5;
  205.  
  206. uniform float Diffusion_3_Desaturate <
  207.     ui_label = "Diffusion 3 desaturation";
  208.     ui_type = "drag";
  209.     ui_min = 0.0;
  210.     ui_max = 1.0;
  211.     ui_tooltip = "Adjust the saturation of the third diffusion layer.";
  212. > = 0.75;
  213.  
  214. // ------------------------------------
  215.  
  216. uniform int Diffusion_1_Quality <
  217.     ui_label = "Diffusion 1 sampling quality";
  218.     // ui_type = "drag";
  219.     // ui_min = 1;
  220.     // ui_max = 64;
  221.     ui_tooltip = "Set the quality of the first diffusion layer. Number is the divider of how many times the texture size is divided in half. Lower number = higher quality, but more processing needed. (No need to adjust this.)";
  222. > = 2;
  223.  
  224. uniform int Diffusion_2_Quality <
  225.     ui_label = "Diffusion 2 sampling quality";
  226.     // ui_type = "drag";
  227.     // ui_min = 1;
  228.     // ui_max = 64;
  229.     ui_tooltip = "Set the quality of the second diffusion layer. Number is the divider of how many times the texture size is divided in half. Lower number = higher quality, but more processing needed. (No need to adjust this.)";
  230. > = 16;
  231.  
  232. uniform int Diffusion_3_Quality <
  233.     ui_label = "Diffusion 3 sampling quality";
  234.     // ui_type = "drag";
  235.     // ui_min = 1;
  236.     // ui_max = 64;
  237.     ui_tooltip = "Set the quality of the third diffusion layer. Number is the divider of how many times the texture size is divided in half. Lower number = higher quality, but more processing needed. (No need to adjust this.)";
  238. > = 64;
  239.  
  240. // ------------------------------------
  241.  
  242.  
  243.  
  244. // Provide a noise texture, basically a gray surface with grain:
  245. texture NoiseTex <source = "hd_noise.png"; > { Width = 1920; Height = 1080; Format = RGBA8; };
  246. sampler NoiseSampler { Texture = NoiseTex; };
  247.  
  248. texture prePassLayer { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA8; };
  249.  
  250. texture blurLayerHorizontal { Width = BUFFER_WIDTH / 2; Height = BUFFER_HEIGHT / 2; Format = RGBA8; };
  251. texture blurLayerVertical { Width = BUFFER_WIDTH / 2; Height = BUFFER_HEIGHT / 2; Format = RGBA8; };
  252. texture blurLayerHorizontalMedRes { Width = BUFFER_WIDTH / 16; Height = BUFFER_HEIGHT / 16; Format = RGBA8; };
  253. texture blurLayerVerticalMedRes { Width = BUFFER_WIDTH / 16; Height = BUFFER_HEIGHT / 16; Format = RGBA8; };
  254. texture blurLayerHorizontalLoRes { Width = BUFFER_WIDTH / 64; Height = BUFFER_HEIGHT / 64; Format = RGBA8; };
  255. texture blurLayerVerticalLoRes { Width = BUFFER_WIDTH / 64; Height = BUFFER_HEIGHT / 64; Format = RGBA8; };
  256.  
  257. uniform int framecount < source = "framecount"; >;
  258.  
  259. sampler2D PFX_PrePassLayer { Texture = prePassLayer; };
  260.  
  261. // ------- samplers for large radius blur
  262. sampler2D PFX_blurHorizontalLayer { Texture = blurLayerHorizontal; };
  263. sampler2D PFX_blurVerticalLayer { Texture = blurLayerVertical; };
  264. sampler2D PFX_blurHorizontalLayerMedRes { Texture = blurLayerHorizontalMedRes; };
  265. sampler2D PFX_blurVerticalLayerMedRes { Texture = blurLayerVerticalMedRes; };
  266. sampler2D PFX_blurHorizontalLayerLoRes { Texture = blurLayerHorizontalLoRes; };
  267. sampler2D PFX_blurVerticalLayerLoRes { Texture = blurLayerVerticalLoRes; };
  268.  
  269.  
  270. float AdjustableSigmoidCurve (float value, float amount) {
  271.  
  272.     float curve = 1.0;
  273.  
  274.     if (value < 0.5)
  275.     {
  276.         curve = pow(value, amount) * pow(2.0, amount) * 0.5;
  277.     }
  278.        
  279.     else
  280.     {  
  281.         curve = 1.0 - pow(1.0 - value, amount) * pow(2.0, amount) * 0.5;
  282.     }
  283.  
  284.     return curve;
  285. }
  286.  
  287. float Randomize (float2 coord) {
  288.     float noise = (frac(sin(dot(coord, float2(12.9898, 78.233))) * 43758.5453));
  289.     return clamp(noise, 0.0, 1.0);
  290. }
  291.  
  292. float SigmoidCurve (float value) {
  293.     value = value * 2.0 - 1.0;
  294.     return -value * abs(value) * 0.5 + value + 0.5;
  295. }
  296.  
  297. float SoftLightBlend (float A, float B) {
  298.    
  299.     if (A > 0.5)
  300.     {
  301.         return (2 * A - 1) * (sqrt(B) - B) + B;
  302.     }
  303.  
  304.     else
  305.     {
  306.         return (2 * A - 1) * (B - pow(B , 2)) + B;
  307.     }  
  308.  
  309.     return 0;
  310. }
  311.  
  312. float4 BlurH (sampler input, float2 uv, float radius, float sampling) {
  313.  
  314.  
  315.     float2 coordinate = float2(0.0, 0.0);
  316.     float4 A = float4(0.0, 0.0, 0.0, 1.0);
  317.     float4 C = float4(0.0, 0.0, 0.0, 1.0);
  318.     float weight = 1.0;
  319.     float width = 1.0 / BUFFER_WIDTH * sampling;                   
  320.     float divisor = 0.000001;
  321.  
  322.         for (float x = -radius; x <= radius; x++)
  323.         {
  324.             coordinate = uv + float2(x * width, 0.0);
  325.             coordinate = clamp(coordinate, 0.0, 1.0);
  326.             A = tex2D(input, coordinate);      
  327.                 weight = SigmoidCurve(1.0 - (abs(x) / radius));    
  328.                 C += A * weight;       
  329.             divisor += weight;
  330.         }
  331.    
  332.     return C / divisor;
  333. }
  334.  
  335. float4 BlurV (sampler input, float2 uv, float radius, float sampling) {
  336.  
  337.     float2 coordinate = float2(0.0, 0.0);
  338.     float4 A = float4(0.0, 0.0, 0.0, 1.0);
  339.     float4 C = float4(0.0, 0.0, 0.0, 1.0);
  340.     float weight = 1.0;    
  341.     float height = 1.0 / BUFFER_HEIGHT * sampling;                 
  342.     float divisor = 0.000001;
  343.    
  344.         for (float y = -radius; y <= radius; y++)
  345.         {
  346.             coordinate = uv + float2(0.0, y * height);
  347.             coordinate = clamp(coordinate, 0.0, 1.0);      
  348.             A = tex2D(input, coordinate);  
  349.                 weight = SigmoidCurve(1.0 - (abs(y) / radius));        
  350.                 C += A * weight;       
  351.             divisor += weight;
  352.         }
  353.  
  354.     return C / divisor;
  355. }
  356.  
  357.  
  358. void PS_PrePass (float4 pos : SV_Position,
  359.                  float2 uv : TEXCOORD,
  360.                  out float4 result : SV_Target)
  361. {
  362.  
  363.     float4 A = tex2D(ReShade::BackBuffer, uv);
  364.            A.r = pow(A.r, Gamma_R);
  365.            A.g = pow(A.g, Gamma_G);
  366.            A.b = pow(A.b, Gamma_B);
  367.            A.r = AdjustableSigmoidCurve(A.r, Contrast_R);
  368.            A.g = AdjustableSigmoidCurve(A.g, Contrast_G);
  369.            A.b = AdjustableSigmoidCurve(A.b, Contrast_B);
  370.    
  371.     // ------- Change color weights of the final render, similar to a printed film
  372.  
  373.         A.g = A.g * 0.8 + A.b * 0.2;
  374.  
  375.         float red = A.r - A.g - A.b;
  376.         float green = A.g - A.r - A.b;
  377.         float blue = A.b - A.r - A.g;
  378.  
  379.         red = clamp(red, 0.0, 1.0);
  380.         green = clamp(green, 0.0, 1.0);
  381.         blue = clamp(blue, 0.0, 1.0);
  382.  
  383.         A = A * (1.0 - red * 0.6);
  384.         A = A * (1.0 - green * 0.8);   
  385.         A = A * (1.0 - blue * 0.3);
  386.        
  387.         // A.r = AdjustableSigmoidCurve(A.r, 1.4);
  388.         // A.r = pow(A.r, 1.1);
  389.        
  390.         result = A;
  391. }
  392.  
  393.  
  394. void PS_HorizontalPass (float4 pos : SV_Position,
  395.                         float2 uv : TEXCOORD, out float4 result : SV_Target)
  396. {
  397.     result = BlurH(PFX_PrePassLayer, uv, Diffusion_1_Radius, Diffusion_1_Quality);
  398.     // result = BlurH(ReShade::BackBuffer, uv, Diffusion_1_Radius, Diffusion_1_Quality);
  399. }
  400.  
  401. void PS_VerticalPass (float4 pos : SV_Position,
  402.                       float2 uv : TEXCOORD, out float4 result : SV_Target)
  403. {
  404.     result = BlurV(PFX_blurHorizontalLayer, uv, Diffusion_1_Radius, Diffusion_1_Quality);
  405. }
  406.  
  407. void PS_HorizontalPassMedRes (float4 pos : SV_Position,
  408.                         float2 uv : TEXCOORD, out float4 result : SV_Target)
  409. {
  410.     result = BlurH(PFX_blurVerticalLayer, uv, Diffusion_2_Radius, Diffusion_2_Quality);
  411. }
  412.  
  413. void PS_VerticalPassMedRes (float4 pos : SV_Position,
  414.                       float2 uv : TEXCOORD, out float4 result : SV_Target)
  415. {
  416.     result = BlurV(PFX_blurHorizontalLayerMedRes, uv, Diffusion_2_Radius, Diffusion_2_Quality);
  417. }
  418.  
  419. void PS_HorizontalPassLoRes (float4 pos : SV_Position,
  420.                         float2 uv : TEXCOORD, out float4 result : SV_Target)
  421. {
  422.     result = BlurH(PFX_blurVerticalLayerMedRes, uv, Diffusion_3_Radius, Diffusion_3_Quality);
  423. }
  424.  
  425. void PS_VerticalPassLoRes (float4 pos : SV_Position,
  426.                       float2 uv : TEXCOORD, out float4 result : SV_Target)
  427. {
  428.     result = BlurV(PFX_blurHorizontalLayerLoRes, uv, Diffusion_3_Radius, Diffusion_3_Quality);
  429. }
  430.  
  431.  
  432.  
  433.  
  434. float4 PandaComposition (float4 vpos : SV_Position,
  435.                          float2 uv : TEXCOORD) : SV_Target
  436. {
  437.     // ------- Create blurred layers for lens diffusion
  438.  
  439.         float4 blurLayer;
  440.         float4 blurLayerMedRes;
  441.         float4 blurLayerLoRes;
  442.    
  443.     if (Enable_Diffusion)
  444.     {
  445.         // TODO enable/disable for performance >>
  446.         blurLayer = tex2D(PFX_blurVerticalLayer, uv);
  447.         blurLayerMedRes = tex2D(PFX_blurVerticalLayerMedRes, uv);
  448.         blurLayerLoRes = tex2D(PFX_blurVerticalLayerLoRes, uv);
  449.        
  450.  
  451.             // ------- Blur layer colors
  452.  
  453.                 float4 blurLayerGray = dot(0.3333, blurLayer.rgb);
  454.                 blurLayer = lerp(blurLayer, blurLayerGray, Diffusion_2_Desaturate);
  455.  
  456.                 float4 blurLayerMedResGray = dot(0.3333, blurLayerMedRes.rgb);
  457.                 blurLayerMedRes = lerp(blurLayerMedRes, blurLayerMedResGray, Diffusion_2_Desaturate);
  458.  
  459.                 float4 blurLayerLoResGray = dot(0.3333, blurLayerLoRes.rgb);
  460.                 blurLayerLoRes = lerp(blurLayerLoRes, blurLayerLoResGray, Diffusion_3_Desaturate);
  461.  
  462.                 // blurLayerMedRes.g *= 0.75;
  463.                 // blurLayerMedRes.b *= 0.5;
  464.  
  465.                 // blurLayerLoRes.g *= 0.75;
  466.                 // blurLayerLoRes.r *= 0.5;
  467.  
  468.  
  469.             // ------- Set blur layer weights
  470.  
  471.                 blurLayer *= Diffusion_1_Amount;
  472.                 blurLayerMedRes *= Diffusion_2_Amount;
  473.                 blurLayerLoRes *= Diffusion_3_Amount;
  474.            
  475.                 blurLayer = pow(blurLayer, Diffusion_1_Gamma);
  476.                 blurLayerMedRes = pow(blurLayerMedRes, Diffusion_2_Gamma);
  477.                 blurLayerLoRes = pow(blurLayerLoRes, Diffusion_3_Gamma);
  478.     }
  479.  
  480.  
  481.     // ------- Read original image
  482.  
  483.         float4 A = tex2D(PFX_PrePassLayer, uv);
  484.         float4 O = tex2D(ReShade::BackBuffer, uv);
  485.  
  486.     // ------- Screen blend the blur layers to create lens diffusion
  487.  
  488.         if (Enable_Diffusion)
  489.         {
  490.             float4 diffusion;
  491.  
  492.             blurLayer = clamp(blurLayer, 0.0, 1.0);
  493.             blurLayerMedRes = clamp(blurLayerMedRes, 0.0, 1.0);
  494.             blurLayerLoRes = clamp(blurLayerLoRes, 0.0, 1.0);
  495.  
  496.             A.rgb = 1.0 - (1.0 - blurLayer.rgb) * (1.0 - A.rgb);
  497.             A.rgb = 1.0 - (1.0 - blurLayerMedRes.rgb) * (1.0 - A.rgb);
  498.             A.rgb = 1.0 - (1.0 - blurLayerLoRes.rgb) * (1.0 - A.rgb);
  499.         }
  500.  
  501.  
  502.     // ------ Compress contrast using Hard Light blending ------
  503.        
  504.         if (Enable_Bleach_Bypass)
  505.         {
  506.             float Ag = dot(float3(0.3333, 0.3333, 0.3333), A.rgb);
  507.             float4 B = A;
  508.             float4 C = 0;
  509.  
  510.             if (Ag > 0.5)
  511.             {
  512.                 C = 1 - 2 * (1 - Ag) * (1 - B);
  513.             }
  514.  
  515.             else
  516.             {
  517.                 C = 2 * Ag * B;
  518.             }
  519.  
  520.             C = pow(C, 0.6);
  521.             A = lerp(A, C, Bleach_Bypass_Amount);
  522.         }
  523.  
  524.  
  525.     // ------- Dither the composition to eliminate banding
  526.  
  527.         if (Enable_Dither)
  528.         {
  529.             float rndSample = tex2D(NoiseSampler, uv);
  530.             float uvRnd = Randomize(rndSample * framecount);
  531.             float uvRnd2 = Randomize(-rndSample * framecount);
  532.  
  533.             float Nt = tex2D(NoiseSampler, uv * uvRnd);
  534.             float Nt2 = tex2D(NoiseSampler, uv * uvRnd2);
  535.             float Nt3 = tex2D(NoiseSampler, -uv * uvRnd);
  536.  
  537.             float3 noise = float3(Nt, Nt2, Nt3);
  538.  
  539.             float4 B = A;
  540.  
  541.             B.r = SoftLightBlend(noise.r, A.r);
  542.             B.g = SoftLightBlend(noise.g, A.g);
  543.             B.b = SoftLightBlend(noise.b, A.b);
  544.  
  545.             A = lerp(A, B, Dither_Amount);
  546.         }
  547.  
  548.     // ------ Compress to TV levels if needed ------
  549.        
  550.         // A = A * 0.9373 + 0.0627;
  551.  
  552.         A = lerp(O, A, Blend_Amount);
  553.  
  554.     return A;
  555. }
  556.  
  557. technique PandaFX
  558. {
  559.         pass PreProcess
  560.         {
  561.             VertexShader = PostProcessVS;
  562.             PixelShader = PS_PrePass;
  563.             RenderTarget = prePassLayer;
  564.         }
  565.  
  566.         pass HorizontalPass
  567.         {
  568.             VertexShader = PostProcessVS;
  569.             PixelShader = PS_HorizontalPass;
  570.             RenderTarget = blurLayerHorizontal;
  571.         }
  572.  
  573.         pass VerticalPass
  574.         {
  575.             VertexShader = PostProcessVS;
  576.             PixelShader = PS_VerticalPass;
  577.             RenderTarget = blurLayerVertical;
  578.         }
  579.  
  580.         pass HorizontalPassMedRes
  581.         {
  582.             VertexShader = PostProcessVS;
  583.             PixelShader = PS_HorizontalPassMedRes;
  584.             RenderTarget = blurLayerHorizontalMedRes;
  585.         }
  586.  
  587.         pass VerticalPassMedRes
  588.         {
  589.             VertexShader = PostProcessVS;
  590.             PixelShader = PS_VerticalPassMedRes;
  591.             RenderTarget = blurLayerVerticalMedRes;
  592.         }
  593.  
  594.         pass HorizontalPassLoRes
  595.         {
  596.             VertexShader = PostProcessVS;
  597.             PixelShader = PS_HorizontalPassLoRes;
  598.             RenderTarget = blurLayerHorizontalLoRes;
  599.         }
  600.  
  601.         pass VerticalPassLoRes
  602.         {
  603.             VertexShader = PostProcessVS;
  604.             PixelShader = PS_VerticalPassLoRes;
  605.             RenderTarget = blurLayerVerticalLoRes;
  606.         }
  607.  
  608.     pass CustomPass
  609.     {
  610.         VertexShader = PostProcessVS;
  611.         PixelShader = PandaComposition ;
  612.     }
  613. }
RAW Paste Data