Custom node. Summing TextureObject2D in loop with UV offset

Hi guys :slight_smile:

The task:
Sampling texture object 2d n times with offsetting UV each cycle.

Whis is what i try:

*float3 a = Texture2DSample(Tex, TexSampler, UV);
int num = 5;
float3 color = 0;
for(int i = 0; i < num; i++){

color += a(Tex, TexSampler, UV+i/2);

}

return color;*

The fun part is that it partially works, cause by changing “num” i will get some obvious results (texture would be more brighter if num are large).
But UV coords are never changes.

Where im wrong?

Well, the answer fas founded. Texture which i use (uv checker) just not really great for debugging such things :smiley:
Looks like code are work as it should.