SHARE
TWEET

Untitled

a guest Jul 11th, 2019 3,444 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "ReShade.fxh"
  2. #include "Macros.fxh"
  3.  
  4. UI_FLOAT_S(SHARPNESS, "Sharpness", "Adjust sharpness (0 = default, 1 = max)", 0.0, 1.0, 0.0)
  5.  
  6. // hack to make ffx_a.h compile, not actually used
  7. uint f32tof16(in float value) { return 0; }
  8. float f16tof32(in uint value) { return 0; }
  9.  
  10. float3 CasLoad(float2 pos)  {
  11.     return tex2Dfetch(ReShade::BackBuffer, int4(pos, 0, 0)).rgb;
  12. }
  13.  
  14. void CasInput(inout float r, inout float g, inout float b) {}
  15.  
  16. #define A_GPU 1
  17. #define A_HLSL 1
  18. #include "ffx_a.h"
  19. #include "ffx_cas.h"
  20.  
  21. float4 MainPS(float4 pos: SV_Position, float2 tex: TexCoord): SV_Target {
  22.     float4 const0;
  23.     float4 const1;
  24.     CasSetup(const0, const1, SHARPNESS, BUFFER_WIDTH, BUFFER_HEIGHT, BUFFER_WIDTH, BUFFER_HEIGHT);
  25.  
  26.     float4 color = float4(0.0, 0.0, 0.0, 0.0);
  27.     CasFilter(color.r, color.g, color.b, pos.xy, const0, const1, true);
  28.  
  29.     return color;
  30. }
  31.  
  32. technique FidelityFX_CAS {
  33.     pass {
  34.         VertexShader = PostProcessVS;
  35.         PixelShader = MainPS;
  36.     }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top