int tIndex = 14; UV = GetDefaultSceneTextureUV(Parameters, 14); int neighbourCount = (BlurSamples-1)/2; float4 Color = 0; for(int x = 0; x < BlurSamples; x++) { for(int y = 0; y < BlurSamples; y++) { float newX = -(neighbourCount-x); float newY = -(neighbourCount-y); float2 scale = float2(BlurWidth * newX/500, BlurWidth * newY/500); Color += SceneTextureLookup(UV + scale,tIndex,false ); } } Color /= BlurSamples*BlurSamples; return Color;