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

iOS shader error: Too many uniforms #7807

Closed
dmarcos opened this issue Dec 16, 2015 · 13 comments
Closed

iOS shader error: Too many uniforms #7807

dmarcos opened this issue Dec 16, 2015 · 13 comments

Comments

@dmarcos
Copy link
Contributor

dmarcos commented Dec 16, 2015

Since I updated to iOS 9.2 on my iphone6 the collada example doesn't load anymore on Safari. I get the following error on console THREE.WebGLProgram: shader error:

erroruniforms

@WestLangley
Copy link
Collaborator

On iPhone iOS 9.2, I get this for r.73 and r.74dev:

ColladaLoader: – "Bip01_Pelvis-node-transform has 36 bones."
WebGLRenderer: too many bones - 36, this GPU supports just 27 (try OpenGL instead of ANGLE)

@mrdoob
Copy link
Owner

mrdoob commented Dec 17, 2015

They reduced the amount of supported uniforms?

@dmarcos
Copy link
Contributor Author

dmarcos commented Dec 17, 2015

I've been using the ColladaLoader everyday for 3 months and it broke after updating to iOS 9.2. Same code base, three.js (r74dev) and collada versions.

@mrdoob
Copy link
Owner

mrdoob commented Dec 17, 2015

Yes, I understand. It would be good to know how many uniforms does webgl on iOS 9.1 support versus 9.2.

@makc
Copy link
Contributor

makc commented Dec 19, 2015

ios 8.3 ipad3 says 128 uniforms per vertex shader, 64 per fragment (webglreport.com)

@leitzler
Copy link
Contributor

iPhone 6s plus - iOS 9.2 - Same error message as OP, no model visible.
iPhone 6 plus - iOS 9.1 - Still same error message, no model visible.

webglreport.com is identical for both (128 per vertex, 64 per fragment).

Must be related to something else.

@mrdoob
Copy link
Owner

mrdoob commented Dec 19, 2015

@dmarcos Are you able to verify that this worked in iOS 9.1? It'll save us time trying to figure out where the problem is.

@dmarcos
Copy link
Contributor Author

dmarcos commented Dec 20, 2015

@mrdoob I don't have a device with iOS 9.1. I will fish around to see if
someone has one.

On Sat, Dec 19, 2015 at 12:57 PM, Mr.doob notifications@github.com wrote:

@dmarcos https://github.com/dmarcos Are you able to verify that this
worked in iOS 9.1? It'll save us time trying to figure out where the
problem is.


Reply to this email directly or view it on GitHub
#7807 (comment).

@makc
Copy link
Contributor

makc commented Dec 21, 2015

pretty much same 💩 under ios 8.3
screen shot 2015-12-21 at 1 09 20
are you sure ios version has anything to do with it?

@ayamflow
Copy link

Hey,

I've been running into the same issue lately.

WebGLRenderer: too many bones - 33, this GPU supports just 27 (try OpenGL instead of ANGLE).

We tried lowering the number of bones to 26, and then the WebGLRenderer error disappears but the "Too many uniforms" stays there. In the shader displayed by the error, I can see:

#define MAX_BONES 26

I then used a model with 25 bones and I could see

#define MAX_BONES 25

Not sure what's happening there but I haven't been able to find the actual maximum bones/uniforms number.

Btw, we tested and reproduced this on iphone6, ipad mini and ipad pro.

Edit: after more testing, I found out that the minimum supported number of bones on iOS (any device) is 24 with Phong, 22 with Lambert (I guess Lambert uses more uniforms).

@alexolotl
Copy link

alexolotl commented Jan 23, 2017

I'm getting this error on iOS 10.2 with my gltfLoader scene as well (using r83). The gltf loader and collada loader examples on the Three.js site don't work on my phone either, keep getting the "too many uniforms, too many bones" error.

I tried manually editing the max bones in my three.min.js file to 24 to test it out- the animation then loads, but in a glitchy way. Did anybody else figure out a solution for this? Is there a way to force the browser to use OpenGL directly rather than ANGLE, if that is what's causing it?

@Mugen87 Mugen87 changed the title Collada loader example not working anymore on iOS 9.2 iOS shader error: Too many uniforms Aug 23, 2017
@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 23, 2017

Is this issue still a problem with a current iOS version? Besides, does the shader error occur only in Safari or in all browser?

@donmccurdy
Copy link
Collaborator

The glTF 2.0 Monster example is working for me. iPhone SE, iOS 11.

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

9 participants