Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Shaders::MeshVisualizer fails to compile on ANGLE #56
The offending line is:
barycentric[int(mod(vertexIndex, 3.0))] = 1.0;
GLSL ES 1.0 specification allows this (section 5.5), so it should be supported in ANGLE too:
Proposed solution is to work around this using ugly branch, but that might harm performance elsewhere.
int i = int(mod(vertexIndex, 3.0)); if(i == 0) barycentric.x = 1.0; else if(i == 1) barycentric.y = 1.0; else barycentric.z = 1.0;
Better (and future proof) solution would be to implement some ANGLE autodetection and enable this only if we might be running on ANGLE. Sadly there doesn't seem to be any easy way to do it.