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
Collaborator

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

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) {

This comment has been minimized.

Copy link
@2youyou2

2youyou2 Jul 2, 2019

Author Collaborator

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

@jareguo jareguo merged commit 99940ea into cocos-creator:v2.1.2 Jul 3, 2019

1 check passed

ci/circleci: test Your tests passed on CircleCI!
Details
@jareguo

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.