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
Fix morph issue on some platforms #7268
Conversation
editor/assets/chunks/morph.chunk
Outdated
int dataPixelStart = int(fetchVec3ArrayFromTexture(tex, iTarget).r); | ||
// `+0.5` because in some platforms, the "fetched integer" may have small error. | ||
// For example `26` may yeild `25.99999`, which is convert to `25` instead of `26` using `int()`. | ||
int dataPixelStart = int(fetchVec3ArrayFromTexture(tex, iTarget).r + 0.5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YunHsiao Notable change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种 offset 在 CPU 做是不是就行了,不要每个顶点都执行一遍了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed at ac84a54
editor/assets/chunks/morph.chunk
Outdated
@@ -6,7 +6,7 @@ | |||
#if __VERSION__ < 300 | |||
in float a_vertexId; | |||
int getVertexId() { | |||
return int(a_vertexId); | |||
return int(a_vertexId + 0.5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YunHsiao Notable change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也一样
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed at ac84a54
Re: cocos-creator/3d-tasks#
Changelog: