@pixi/core
Version:
Core PixiJS
21 lines (18 loc) • 657 B
JavaScript
import { PRECISION } from '@pixi/constants';
import { getTestContext } from './getTestContext.mjs';
let maxFragmentPrecision;
function getMaxFragmentPrecision() {
if (!maxFragmentPrecision) {
maxFragmentPrecision = PRECISION.MEDIUM;
const gl = getTestContext();
if (gl) {
if (gl.getShaderPrecisionFormat) {
const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);
maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM;
}
}
}
return maxFragmentPrecision;
}
export { getMaxFragmentPrecision };
//# sourceMappingURL=getMaxFragmentPrecision.mjs.map