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

StageGL, low-end android phone exception with latest easeljs-NEXT #954

Open
Nestorferrando opened this issue Apr 28, 2018 · 2 comments
Open
Labels

Comments

@Nestorferrando
Copy link

Launching an app based on stageGL on an low-end android device throws the following exception:

Uncaught Cannot compile shader ERROR: 0:1: 'highp' : precision is not supported in fragment shader

@DavidHGillen
Copy link

Something not supporting highp is quite low end, that's for sure. There hadn't been any plans to account for it, but it's basically a quality flag. If adjusted too low it will produce artifacts.

I don't have plans yet to support that but I'll consider adding something.

For now the "get it working" patch would be something like the following:

// load StageGL

createjs.StageGL._createShaderORIG = createjs.StageGL._createShader;
createjs.StageGL._createShader = function (gl, type, str) {
    str = str.replace(/highp/g, "mediump");
    return this._createShaderORIG(gl, type, str);
}

// create Stage

@Nestorferrando
Copy link
Author

Nestorferrando commented Apr 30, 2018

Hi! thanks for considering adding something.

Just for giving more details, the phone GPU is a ARM Mali MP-400. Android version 6.0. The GPU is quite old but still sold on some low-end phones.

I lowered the shader quality to mediump and the game started. Although the performance is not perfect, it is just good enough. The graphics quality seems good enough also.

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

3 participants