Hi I was working on my rain material, and got into problems.
I imported and animated sprite texture and used flipbook node for it.
After applying the material, I thought the raindrops were too small/big and needs to be adjusted.
so, what I tried first was this:
but, it didn’t work. there were seams and speed was crushing.
my second try was this:
and same thing happened.
is there any way to adjust tiling with a texture already has a uv input with a flipbook node?
Multiply the input UVs, then apply a Frac on them, instead of multiplying the output UVs
I keeps getting helps from you thank you very much!
can you explain why adding frac solves this?
Frac leaves only the fractional part of a number. For example, if you provide:
it will return:
This way, the previously multiplied UVs will be always 0-1 after
frac. While it doesn’t matter for the regular texture sampler (it wraps UVs automatically), it makes a difference for the
frac has one disadvantage - it breaks the continuity of the UVs between the 0.999 and 0.0. A texture sampler would most likely produce a blurred 2-pixel seam in such places. In other words, when
frac on UVs is not needed, it’s better to avoid it - and let the texture sampler do the wrapping automatically. But that’s another, long story, about derivatives, DDX / DDY and such.