Skip to content

Commit

Permalink
fixed edge blur
Browse files Browse the repository at this point in the history
  • Loading branch information
lukakldiashvili committed Feb 5, 2023
1 parent 8741166 commit c9b3105
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions UnifiedUniversalBlur/Shaders/KawaseBlur.shader
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Shader "Unified/KawaseBlur"
float i = offset;

float4 col;
col.rgb = tex2D(blurTexture, uv).rgb;
col.rgb += tex2D(blurTexture, uv + float2(i, i) * res).rgb;
col.rgb += tex2D(blurTexture, uv + float2(i, -i) * res).rgb;
col.rgb += tex2D(blurTexture, uv + float2(-i, i) * res).rgb;
col.rgb += tex2D(blurTexture, uv + float2(-i, -i) * res).rgb;
col.rgb = tex2D(blurTexture, saturate(uv)).rgb;
col.rgb += tex2D(blurTexture, saturate(uv + float2(i, i) * res)).rgb;
col.rgb += tex2D(blurTexture, saturate(uv + float2(i, -i) * res)).rgb;
col.rgb += tex2D(blurTexture, saturate(uv + float2(-i, i) * res)).rgb;
col.rgb += tex2D(blurTexture, saturate(uv + float2(-i, -i) * res)).rgb;
col.rgb /= 5.0f;

col.a = 1;
Expand Down

0 comments on commit c9b3105

Please sign in to comment.