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

fixed get max joint matrix size for skinned mesh renderer #4772

Merged
merged 2 commits into from Jul 3, 2019

Conversation

@2youyou2
Copy link
Contributor

@2youyou2 2youyou2 commented Jul 1, 2019

Re: cocos-creator/2d-tasks#1578

Changes:

  • fixed get max joint matrix size for skinned mesh renderer
cocos2d/core/platform/CCSys.js Outdated Show resolved Hide resolved
Loading

let gl = cc.game._renderContext;
let maxUniforms = Math.floor(gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS) / 4) - LEFT_UNIFORM_SIZE;
if (maxUniforms < JOINT_MATRICES_SIZE) {
Copy link
Contributor Author

@2youyou2 2youyou2 Jul 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JOINT_MATRICES_SIZE 在 shader 中是定死的 number ,如果可用 uniform 比 JOINT_MATRICES_SIZE 小,那么就不能用 uniform 传 joint matrix 了

Loading

@jareguo jareguo merged commit 99940ea into cocos-creator:v2.1.2 Jul 3, 2019
1 check passed
Loading
@jareguo
Copy link
Member

@jareguo jareguo commented Jul 3, 2019

修复 GPU 骨骼数量未能正确判断,导致某些平台模型可能不显示的问题

Loading

@2youyou2 2youyou2 deleted the v2.1.2-max-joint-size branch Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants