Skip to content

Instantly share code, notes, and snippets.

@ufna
Created January 23, 2020 11:53
Show Gist options
  • Save ufna/9766ddfed15dc4fe0a711086089ebf82 to your computer and use it in GitHub Desktop.
Save ufna/9766ddfed15dc4fe0a711086089ebf82 to your computer and use it in GitHub Desktop.
Kawase Blur HLSL function for UE4
float3 BlurColor = Texture2DSample(Tex, TexSampler, UV + float2(Shift, Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(Shift, -Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(-Shift, Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(-Shift, -Shift) / Resolution);
BlurColor /= 4.0;
return BlurColor;
@ufna
Copy link
Author

ufna commented Jan 23, 2020

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment