function setPrecision(src, requestedPrecision, maxSupportedPrecision) {
    if (src.substring(0, 9) !== 'precision') {
        // no precision supplied, so PixiJS will add the requested level.
        var precision = requestedPrecision;
        // If highp is requested but not supported, downgrade precision to a level all devices support.
        if (requestedPrecision === _pixi_constants__WEBPACK_IMPORTED_MODULE_1__.PRECISION.HIGH && maxSupportedPrecision !== _pixi_constants__WEBPACK_IMPORTED_MODULE_1__.PRECISION.HIGH) {
            precision = _pixi_constants__WEBPACK_IMPORTED_MODULE_1__.PRECISION.MEDIUM;
        }
        return "precision " + precision + " float;\n" + src;
    }
    else if (maxSupportedPrecision !== _pixi_constants__WEBPACK_IMPORTED_MODULE_1__.PRECISION.HIGH && src.substring(0, 15) === 'precision highp') {
        // precision was supplied, but at a level this device does not support, so downgrading to mediump.
        return src.replace('precision highp', 'precision mediump');
    }
    return src;
}
Sets the float precision on the shader, ensuring the device supports the request precision.
If the precision is already present, it just ensures that the device is able to handle it.
@private
@param {string} src - The shader source
@param {PIXI.PRECISION} requestedPrecision - The request float precision of the shader.
@param {PIXI.PRECISION} maxSupportedPrecision - The maximum precision the shader supports.
@returns {string} modified shader source