Closed litefeel closed 6 years ago
hi, good question.
using texture.filterMode = Bilinear
for interpolation of each frames.
The y direction may be interpolated, but the x direction needs to be the center of the texel.
uv.x = (vid + 0.5) / textureWidth
is center value of texel, which is position of vertex.
https://github.com/sugi-cho/Animation-Texture-Baker/blob/cec8861d88f757f9b9f21ee300f823e76b78cec7/Assets/AnimationBaker/Shaders/TextureAnimPlayer.shader#L52
Hello. thanks for your code. I read your code and it works perfectly. now. I don’t understand a bit.
vid(SV_VertexID)
is the index of vertex. it's 0, 1, 2, 3 .... (vertexCount - 1)ts.x
is1 / textureWidth
my question: why
vid + 0.5
?Please give me a hint. thanks.