renderer.capabilities.getMaxPrecision reported incorrectly

Hi All,

I’ve just noticed that the precision parameter passed to WebGLRenderer constructor might be getting ignored. The original behavior I noticed was flickering on a surface that is far from the camera and has both texture and lightmap on it. On zooming in, the flickering vanishes. I am starting to think it must be related to float precision causing z-fighting. reports that the float precision is highp, but the capabilities.getMaxPrecision is coming out to be lowp.

I have checked on the latest Firefox (87) and Chrome (89.0.*) on an m1 mac mini. I’ve also checked this on the latest Chrome for Android.

Is this supposed to be this way or is this a bug in the library?

Looks like getMaxPrecision has a precision parameter and then checks with webgl if that is present or not and just return lowp when called with out any arguments.

My original issue still remains, but for now going to debug elsewhere. getMaxPrecision could use some documentation update, I guess.

[edit] original issue resolved. thanks to logarithmicDepthBuffer.