Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float3 gLensBlurV_ps (float2 iTexCoord : TEXCOORD0,
- uniform sampler RT : register (s0),
- uniform sampler focusMap : register(s1),
- uniform float viewport_height) : COLOR
- {
- float focus = tex2D(focusMap, iTexCoord);
- float3 endColor = tex2D(RT, iTexCoord).rgb * weight[0];
- for (int i=1; i<6; i++)
- {
- endColor += tex2D(RT, iTexCoord + float2(0.0, offset[i]*focus*3)/viewport_height).rgb * weight[i]*0.5f;
- endColor += tex2D(RT, iTexCoord - float2(0.0, offset[i]*focus*3)/viewport_height).rgb * weight[i]*0.5f;
- endColor += tex2D(RT, iTexCoord + float2(offset[i]*focus*3, 0.0)/viewport_width).rgb * weight[i]*0.5f;
- endColor += tex2D(RT, iTexCoord - float2(offset[i]*focus*3, 0.0)/viewport_width).rgb * weight[i]*0.5f;
- }
- return endColor;
- }
Add Comment
Please, Sign In to add comment