declare const _default: "#version 300 es\n\n#define SHADER_NAME scenegraph-layer-vertex-shader\n\n// Instance attributes\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin vec3 instanceModelMatrixCol0;\nin vec3 instanceModelMatrixCol1;\nin vec3 instanceModelMatrixCol2;\nin vec3 instanceTranslation;\n\n// Scale the model\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\n\n// Primitive attributes\nin vec3 positions;\n#ifdef HAS_UV\n in vec2 texCoords;\n#endif\n#ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n in vec3 normals;\n #endif\n#endif\n\n// Varying\nout vec4 vColor;\n\n// MODULE_PBR contains all the varying definitions needed\n#ifndef MODULE_PBR\n #ifdef HAS_UV\n out vec2 vTEXCOORD_0;\n #endif\n#endif\n\n// Main\nvoid main(void) {\n #if defined(HAS_UV) && !defined(MODULE_PBR)\n vTEXCOORD_0 = texCoords;\n geometry.uv = texCoords;\n #endif\n\n geometry.worldPosition = instancePositions;\n geometry.pickingColor = instancePickingColors;\n\n mat3 instanceModelMatrix = mat3(instanceModelMatrixCol0, instanceModelMatrixCol1, instanceModelMatrixCol2);\n\n vec3 normal = vec3(0.0, 0.0, 1.0);\n #ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n normal = instanceModelMatrix * (sceneModelMatrix * vec4(normals, 0.0)).xyz;\n #endif\n #endif\n\n float originalSize = project_size_to_pixel(sizeScale);\n float clampedSize = clamp(originalSize, sizeMinPixels, sizeMaxPixels);\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * vec4(positions, 1.0)).xyz) * sizeScale * (clampedSize / originalSize) + instanceTranslation;\n if(composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n // using instancePositions as world coordinates\n // when using globe mode, this branch does not re-orient the model to align with the surface of the earth\n // call project_normal before setting position to avoid rotation\n geometry.normal = project_normal(normal);\n geometry.worldPosition += pos;\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, geometry.position);\n geometry.normal = project_normal(normal);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n // set PBR data\n pbr_vPosition = geometry.position.xyz;\n #ifdef HAS_NORMALS\n pbr_vNormal = geometry.normal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = texCoords;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n"; export default _default; //# sourceMappingURL=scenegraph-layer-vertex.glsl.d.ts.map