Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于AnimMapShader #8

Open
beetxm opened this issue Aug 12, 2021 · 2 comments
Open

关于AnimMapShader #8

beetxm opened this issue Aug 12, 2021 · 2 comments

Comments

@beetxm
Copy link

beetxm commented Aug 12, 2021

vid:SV_VertexID

float animMap_x = (vid + 0.5) * _AnimMap_TexelSize.x;

请问为什么vid需要加0.5呢

@JiongXiaGu
Copy link

因为纹理过滤模式(FilterMode)的原因,库用的是 “Bilinear”模式有对像素进行插值,所以需要+0.5取到两个像素中间。你把纹理过滤设置为 Point 就不需要 +0.5 了~

@beetxm
Copy link
Author

beetxm commented Dec 27, 2021

谢谢大佬!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants