Hello!
I’m trying to blur texture. I finded how to blur Texture Object (Texture2D), but is it possible to blur TextureSample (float3) ?
There code for using with Texture Object:
float3 CurColor;
int i;
Steps = max(Steps, 1);
float StepSize = Distance / (int) Steps;
float2 NewUV = UV - Vector*0.5*Distance;
while ( i < (int) Steps)
{
CurColor += Texture2DSample(Tex,TexSampler,NewUV);
NewUV.x += (StepSize * Vector.x);
NewUV.y += (StepSize * Vector.y);
i++;
}
CurColor = CurColor / i;
return CurColor;
I think that if I find a replacement for this function, everything should work out:
CurColor += Texture2DSample(Tex,TexSampler,NewUV);
