Loadus

PandaFX.fx for ReShade v3.x

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