'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }

/* eslint-disable camelcase */
var INITIAL_STATE = {};

function getUniforms() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;

  _objectDestructuringEmpty(_ref);

  var uniforms = {};
  return uniforms;
}

var vs = 'vec4 project_position_and_offset_to_clipspace_fp64(\n  vec3 position64xyzHi, vec2 position64xyLow, vec3 offset, out vec4 worldPosition\n) {\n  // This is the local offset to the instance position\n  vec2 offset64[4];\n  vec4_fp64(vec4(offset, 0.0), offset64);\n\n  // The 64 bit xy vertex position\n  vec4 position64xy = vec4(\n    position64xyzHi.x, position64xyLow.x,\n    position64xyzHi.y, position64xyLow.y\n  );\n\n  float z = project_scale(position64xyzHi.z);\n\n  // Apply web mercator projection (depends on coordinate system imn use)\n  vec2 projectedPosition64xy[2];\n  project_position_fp64(position64xy, projectedPosition64xy);\n\n  vec2 worldPosition64[4];\n  worldPosition64[0] = sum_fp64(offset64[0], projectedPosition64xy[0]);\n  worldPosition64[1] = sum_fp64(offset64[1], projectedPosition64xy[1]);\n  worldPosition64[2] = sum_fp64(offset64[2], vec2(z, 0.0));\n  worldPosition64[3] = vec2(1.0, 0.0);\n\n  worldPosition = vec4(projectedPosition64xy[0].x, projectedPosition64xy[1].x, z, 1.0);\n\n  return project_to_clipspace_fp64(worldPosition64);\n}\n\nvec4 project_position_and_offset_to_clipspace_fp64(\n  vec3 position64xyzHi, vec2 position64xyLow, vec3 offset\n) {\n  vec4 worldPosition;\n  return project_position_and_offset_to_clipspace_fp64(\n    position64xyzHi, position64xyLow, offset, worldPosition\n  );\n}\n';

exports.default = {
  name: 'project64utils',
  dependencies: ['project64'],
  vs: vs,
  fs: null,
  getUniforms: getUniforms
};
//# sourceMappingURL=project64utils.js.map