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

困惑为什么两个同样的对象,播放不同的动画,实现同一个drawcall? #19

Open
Alan-ZhangDaixi opened this issue Jul 17, 2018 · 1 comment
Labels

Comments

@Alan-ZhangDaixi
Copy link

我最开始的理解是要让同样的两个单位,播放不一样的动画,使用material property block分别传给shader不一样的参数,这样实现使用同一个material还能让两个单位获得不一样的参数,实现播放不一样的动画

但是我自己测试,即使两个单位用的同一个material(我把材质的instanceid打印出来发现是一样的),用material property block修改其中的一个参数,就会多一个drawcall。

我不知道是我哪里用错了吗?困扰我好久了?希望能获得解答,非常感谢!

@chengkehan
Copy link
Owner

是否开启了 GPU Instancing ?

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

No branches or pull requests

2 participants