Guest User

Untitled

a guest
Oct 2nd, 2018
4,704
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const float2 ScreenMult = View.ViewSizeAndInvSize.xy * View.BufferSizeAndInvSize.zw;
  2.  
  3. const int TexIndex = 14;
  4. const float Samples[11] = {-0.08,-0.05,-0.03,-0.02,-0.01,0,0.01,0.02,0.03,0.05,0.08};
  5.  
  6. float2 dir = float2(0.5,0.5) - ScreenUV;
  7. float4 sum = float4(0.0, 0.0, 0.0, 0.0);
  8. for(int i = 0; i<11; i++)
  9. {
  10. float2 pos = ScreenUV + dir * Samples[i] * BlurDist;
  11. pos = clamp(pos, float2(0.0,0.0), float2(1.0, 1.0));
  12. sum += SceneTextureLookup(pos * ScreenMult, TexIndex, false);
  13. }
  14.  
  15. return sum / 11.0;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×