Toon shader (and others) cause error on mobile devices

Bugs will be moved here once resolved.

Post » Wed Mar 05, 2014 6:58 am

Problem Description
____ A concise description of your problem here ____
When using toon shader and possibly others, you get an error that highp is not supported for fragment shader on some mobile devices. See here: http://updates.html5rocks.com/2011/12/U ... n-possible. This will cause mobile chrome to give an error and not load the game, though other browsers like firefox seem to load it but perhaps ignore the shader.
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Wed Mar 12, 2014 7:17 pm

Can you describe which devices and with which browsers specifically? I'd have thought the browser engine would just substitute a working precision instead.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Wed Mar 12, 2014 7:22 pm

I have since stopped using the toon shader (I only use shaders to mockup stuff that I later put directly into the art), but I can run some tests and figure it out, I think the browser was definitely a version of Chrome, and the device may have been the HTC One X on Sprint but I'm less sure on the device.

Relates to this maybe:

https://code.google.com/p/chromium/issu ... ?id=245755

essentially sounds like a bug in the drivers that allows chrome to detect available precision correctly, or maybe some other problem causing Chrome's detection to fail.
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Wed Mar 12, 2014 7:46 pm

I think I found a workaround based on checking if GL_FRAGMENT_PRECISION_HIGH is defined in the shader and falling back to mediump instead. I've made the change for the next build but don't have any affected devices to test on - could you let me know if it's fixed when r164 is out?
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Wed Mar 12, 2014 7:50 pm

Ok, will do.
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Sat Mar 15, 2014 3:14 am

This is now fixed on my device. Also I guess maybe having medium precision shaders as an option could be good for performance?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest