Guest User

Untitled

a guest
Apr 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. float3 gLensBlurV_ps (float2 iTexCoord : TEXCOORD0,
  2. uniform sampler RT : register (s0),
  3. uniform sampler focusMap : register(s1),
  4. uniform float viewport_height) : COLOR
  5. {
  6. float focus = tex2D(focusMap, iTexCoord);
  7. float3 endColor = tex2D(RT, iTexCoord).rgb * weight[0];
  8. for (int i=1; i<6; i++)
  9. {
  10. endColor += tex2D(RT, iTexCoord + float2(0.0, offset[i]*focus*3)/viewport_height).rgb * weight[i]*0.5f;
  11. endColor += tex2D(RT, iTexCoord - float2(0.0, offset[i]*focus*3)/viewport_height).rgb * weight[i]*0.5f;
  12. endColor += tex2D(RT, iTexCoord + float2(offset[i]*focus*3, 0.0)/viewport_width).rgb * weight[i]*0.5f;
  13. endColor += tex2D(RT, iTexCoord - float2(offset[i]*focus*3, 0.0)/viewport_width).rgb * weight[i]*0.5f;
  14. }
  15. return endColor;
  16. }
Add Comment
Please, Sign In to add comment