Advertisement
Guest User

ENBPOST

a guest
Apr 1st, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. //==========//
  2. // Textures //
  3. //==========//
  4. Texture2D TextureOriginal; //color R10B10G10A2 32 bit ldr format
  5. Texture2D TextureColor; //color which is output of previous technique (except when drawed to temporary render target), R10B10G10A2 32 bit ldr format
  6. Texture2D TextureDepth; //scene depth R32F 32 bit hdr format
  7.  
  8. Texture2D RenderTargetRGBA32; //R8G8B8A8 32 bit ldr format
  9. Texture2D RenderTargetRGBA64; //R16B16G16A16 64 bit ldr format
  10. Texture2D RenderTargetRGBA64F; //R16B16G16A16F 64 bit hdr format
  11. Texture2D RenderTargetR16F; //R16F 16 bit hdr format with red channel only
  12. Texture2D RenderTargetR32F; //R32F 32 bit hdr format with red channel only
  13. Texture2D RenderTargetRGB32F; //32 bit hdr format without alpha
  14.  
  15. // Include Needes Values
  16. #include "Shaders/ENBcommon.fxh"
  17. #include "Shaders/Globals.fxh"
  18. #include "Shaders/ReforgedUI.fxh"
  19.  
  20. // UI
  21. UI_SEPARATOR_CUSTOM ("\xD7 GTA V POST EFFECTS \xD7")
  22. UI_WHITESPACE(4)
  23. #define UI_CATEGORY Cam
  24. UI_SEPARATOR_CUSTOM ("Camera Effects")
  25. #define UI_PREFIX_MODE PREFIX
  26. UI_BOOL(ENABLE_CROPPREVIEW, "Toggle Letterbox", true)
  27. UI_FLOAT(Wratio, "Letterbox Size", 0.0, 30.0, 0.1)
  28. UI_FLOAT(VignetteAmount, "Vignette Scale", 0.0, 1.0, 0.2)
  29.  
  30.  
  31. //===========//
  32. // Functions //
  33. //===========//
  34.  
  35. #include "Shaders/SMAA/enbsmaa.fx"
  36. #include "Shaders/Vignette.fxh"
  37. #include "Shaders/CA.fxh"
  38. #include "Shaders/FXAA.fxh"
  39. #include "Shaders/Letterbox.fxh"
  40. #include "Shaders/ACES.fxh"
  41. #include "Shaders/TemporalBloom.fxh"
  42.  
  43. //===============//
  44. // Pixel Shaders //
  45. //===============//
  46.  
  47.  
  48.  
  49. float4 PS_PostFX(VS_OUTPUT IN) : SV_Target
  50. {
  51. float2 coord = IN.txcoord.xy;
  52. float4 Color = TextureColor.Sample(LinearSampler, coord);
  53. Color = Vignette(Color, coord);
  54. return saturate(Color);
  55. }
  56.  
  57. technique11 SMAAFXAA <string RenderTarget= SMAA_STRING(SMAA_EDGE_TEX); string UIName= "SMAA + FXAA";>
  58. {
  59. pass Clear
  60. {
  61. SetVertexShader(CompileShader(vs_5_0, VS_SMAAClear()));
  62. SetPixelShader (CompileShader(ps_5_0, PS_SMAAClear()));
  63. }
  64.  
  65. pass EdgeDetection
  66. {
  67. SetVertexShader(CompileShader(vs_5_0, VS_SMAAEdgeDetection()));
  68. SetPixelShader (CompileShader(ps_5_0, PS_SMAAEdgeDetection()));
  69. }
  70. }
  71.  
  72. technique11 SMAAFXAA1 <string RenderTarget=SMAA_STRING(SMAA_BLEND_TEX);>
  73. {
  74. pass Clear
  75. {
  76. SetVertexShader(CompileShader(vs_5_0, VS_SMAAClear()));
  77. SetPixelShader (CompileShader(ps_5_0, PS_SMAAClear()));
  78. }
  79.  
  80. pass BlendingWeightCalculation
  81. {
  82. SetVertexShader(CompileShader(vs_5_0, VS_SMAABlendingWeightCalculation()));
  83. SetPixelShader (CompileShader(ps_5_0, PS_SMAABlendingWeightCalculation()));
  84. }
  85. }
  86.  
  87. technique11 SMAAFXAA2
  88. {
  89. pass NeighborhoodBlending
  90. {
  91. SetVertexShader(CompileShader(vs_5_0, VS_SMAANeighborhoodBlending()));
  92. SetPixelShader (CompileShader(ps_5_0, PS_SMAANeighborhoodBlending()));
  93. }
  94. }
  95.  
  96. technique11 SMAAFXAA3
  97. {
  98. pass p0
  99. {
  100. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  101. SetPixelShader (CompileShader(ps_5_0, PS_FXAA()));
  102. }
  103. }
  104.  
  105. technique11 SMAAFXAA4
  106. {
  107. pass p0
  108. {
  109. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  110. SetPixelShader (CompileShader(ps_5_0, PS_PostFX()));
  111. }
  112. }
  113.  
  114. technique11 SMAAFXAA5
  115. {
  116. pass p0
  117. {
  118. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  119. SetPixelShader (CompileShader(ps_5_0, CA()));
  120. }
  121. }
  122.  
  123. technique11 SMAAFXAA6
  124. {
  125. pass p0
  126. {
  127. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  128. SetPixelShader (CompileShader(ps_5_0, PS_TempBloom()));
  129. }
  130. }
  131.  
  132. technique11 SMAAFXAA7
  133. {
  134. pass p0
  135. {
  136. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  137. SetPixelShader (CompileShader(ps_5_0, PS_wolCropPreview()));
  138. }
  139. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement