Shadergraph getting jagged edge when Modulo UV by 1

I just notice my shader has white line on top and right egdes when increasing glowing value.
I created a simple nodes to reproduce this.
Everything is shown in the image.
How to get rid of these jagged edges?

Option 1 you have a semi transparent pixel at the edge of your texture which your graphics program filled with white / dark grey.

Option 2
You are creating a mip mapping issue. by using modulo you’ve created a pixel where the uv range suddenly moves from 0.9999 to 0.00001. Mip mapping is confused by this and squashes the entire texture into this one pixel difference.

(see line above white square in preview)

This can be fixed by manually suppling the derivative gradients. Select the sample node and in the graph inspector select mip sampling mode gradient

1 Like