Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. //================= V2.0 ===================//
  2. // _____ __ //
  3. // / ___/__ _______________ ____ _/ / //
  4. // \__ \/ / / / ___/ ___/ _ \/ __ `/ / //
  5. // ___/ / /_/ / / / / / __/ /_/ / / //
  6. // /____/\__,_/_/ /_/ \___/\__,_/_/ //
  7. // //
  8. //==========================================//
  9. // Gaussian Bloom by Prod80 //
  10. // ENBSMAA and Lut Code by kingeric1992 //
  11. // LumaSharp, Curves and Vibrance by Ceejay //
  12. // Crop Assistant by Wolrajh //
  13. // Setup and Tweaked by Adyss //
  14. //==========================================//
  15.  
  16. //==========//
  17. // Textures //
  18. //==========//
  19. Texture2D TextureOriginal; //color R10B10G10A2 32 bit ldr format
  20. Texture2D TextureColor; //color which is output of previous technique (except when drawed to temporary render target), R10B10G10A2 32 bit ldr format
  21. Texture2D TextureDepth; //scene depth R32F 32 bit hdr format
  22.  
  23. Texture2D RenderTargetRGBA32; //R8G8B8A8 32 bit ldr format
  24. Texture2D RenderTargetRGBA64; //R16B16G16A16 64 bit ldr format
  25. Texture2D RenderTargetRGBA64F; //R16B16G16A16F 64 bit hdr format
  26. Texture2D RenderTargetR16F; //R16F 16 bit hdr format with red channel only
  27. Texture2D RenderTargetR32F; //R32F 32 bit hdr format with red channel only
  28. Texture2D RenderTargetRGB32F; //32 bit hdr format without alpha
  29.  
  30. // Include Needes Values
  31. #include "Shaders/ENBcommon.fxh"
  32. #include "Shaders/Globals.fxh"
  33. #include "Shaders/ReforgedUI.fxh"
  34.  
  35. // UI
  36. UI_SEPARATOR_CUSTOM ("\xD7 Surreal Post FX V2.0 \xD7")
  37. UI_WHITESPACE(1)
  38. #define UI_CATEGORY Sharpening
  39. UI_SEPARATOR
  40. UI_FLOAT_EI(LSharpStrength, "Image Sharpness", 0.0, 3.0, 1.0)
  41. UI_WHITESPACE(3)
  42. #define UI_CATEGORY Manual
  43. UI_SEPARATOR_CUSTOM("Manual Color")
  44. UI_BOOL(ManualColors, "Toggle Manual Edits", true)
  45. UI_FLOAT_EI(Exposure, "Exposure", -1.0, 1.0, 0.0)
  46. UI_FLOAT_EI(Contrast, "Contrast", 0.0, 1.0, 0.0)
  47. UI_FLOAT_EI(PostGamma, "Gamma", 0.0, 2.2, 1.0)
  48. UI_FLOAT_EI(Vibrance, "Vibrance", -1.0, 1.0, 0.0)
  49. UI_FLOAT3_DNI(RGBBalance, "RGB Saturation", 1.0, 1.0, 1.0)
  50. UI_WHITESPACE(4)
  51. #define UI_CATEGORY Cam
  52. UI_SEPARATOR_CUSTOM ("Camera Effects")
  53. #define UI_PREFIX_MODE PREFIX
  54. UI_BOOL(ENABLE_CROPPREVIEW, "Toggle Letterbox", true)
  55. UI_FLOAT(Wratio, "Letterbox Size", 0.0, 30.0, 0.1)
  56. UI_FLOAT(VignetteAmount, "Vignette Scale", 0.0, 1.0, 0.2)
  57.  
  58.  
  59. //===========//
  60. // Functions //
  61. //===========//
  62.  
  63. #include "Shaders/SMAA/enbsmaa.fx"
  64. #include "Shaders/Vignette.fxh"
  65. #include "Shaders/Dither.fxh"
  66. #include "Shaders/CA.fxh"
  67. #include "Shaders/FXAA.fxh"
  68. #include "Shaders/Letterbox.fxh"
  69. #include "Shaders/ACES.fxh"
  70. #include "Shaders/TemporalBloom.fxh"
  71.  
  72. //===============//
  73. // Pixel Shaders //
  74. //===============//
  75.  
  76.  
  77.  
  78. float4 PS_PostFX(VS_OUTPUT IN) : SV_Target
  79. {
  80. float2 coord = IN.txcoord.xy;
  81. float4 Color = TextureColor.Sample(LinearSampler, coord);
  82. Color = Vignette(Color, coord);
  83. return saturate(Color);
  84. }
  85.  
  86. technique11 SMAAFXAA <string RenderTarget= SMAA_STRING(SMAA_EDGE_TEX); string UIName= "SMAA + FXAA";>
  87. {
  88. pass Clear
  89. {
  90. SetVertexShader(CompileShader(vs_5_0, VS_SMAAClear()));
  91. SetPixelShader (CompileShader(ps_5_0, PS_SMAAClear()));
  92. }
  93.  
  94. pass EdgeDetection
  95. {
  96. SetVertexShader(CompileShader(vs_5_0, VS_SMAAEdgeDetection()));
  97. SetPixelShader (CompileShader(ps_5_0, PS_SMAAEdgeDetection()));
  98. }
  99. }
  100.  
  101. technique11 SMAAFXAA1 <string RenderTarget=SMAA_STRING(SMAA_BLEND_TEX);>
  102. {
  103. pass Clear
  104. {
  105. SetVertexShader(CompileShader(vs_5_0, VS_SMAAClear()));
  106. SetPixelShader (CompileShader(ps_5_0, PS_SMAAClear()));
  107. }
  108.  
  109. pass BlendingWeightCalculation
  110. {
  111. SetVertexShader(CompileShader(vs_5_0, VS_SMAABlendingWeightCalculation()));
  112. SetPixelShader (CompileShader(ps_5_0, PS_SMAABlendingWeightCalculation()));
  113. }
  114. }
  115.  
  116. technique11 SMAAFXAA2
  117. {
  118. pass NeighborhoodBlending
  119. {
  120. SetVertexShader(CompileShader(vs_5_0, VS_SMAANeighborhoodBlending()));
  121. SetPixelShader (CompileShader(ps_5_0, PS_SMAANeighborhoodBlending()));
  122. }
  123. }
  124.  
  125. technique11 SMAAFXAA3
  126. {
  127. pass p0
  128. {
  129. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  130. SetPixelShader (CompileShader(ps_5_0, PS_FXAA()));
  131. }
  132. }
  133.  
  134. technique11 SMAAFXAA4
  135. {
  136. pass p0
  137. {
  138. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  139. SetPixelShader (CompileShader(ps_5_0, PS_PostFX()));
  140. }
  141. }
  142.  
  143. technique11 SMAAFXAA5
  144. {
  145. pass p0
  146. {
  147. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  148. SetPixelShader (CompileShader(ps_5_0, CA()));
  149. }
  150. }
  151.  
  152. technique11 SMAAFXAA6
  153. {
  154. pass p0
  155. {
  156. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  157. SetPixelShader (CompileShader(ps_5_0, PS_TempBloom()));
  158. }
  159. }
  160.  
  161. technique11 SMAAFXAA7
  162. {
  163. pass p0
  164. {
  165. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  166. SetPixelShader (CompileShader(ps_5_0, PS_wolCropPreview()));
  167. }
  168. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement