export declare const common_frag_params = "\nuniform int uObjectId;\nuniform int uInstanceCount;\nuniform int uGroupCount;\n\nuniform int uPickType;\nuniform int uMarkingType;\n\nuniform vec4 uCameraPlane;\nuniform vec4 uLod;\n\n#if dClipObjectCount != 0\n    uniform int uClipObjectType[dClipObjectCount];\n    uniform bool uClipObjectInvert[dClipObjectCount];\n    uniform vec3 uClipObjectPosition[dClipObjectCount];\n    uniform vec4 uClipObjectRotation[dClipObjectCount];\n    uniform vec3 uClipObjectScale[dClipObjectCount];\n    uniform mat4 uClipObjectTransform[dClipObjectCount];\n\n    #if defined(dClipping)\n        #if __VERSION__ == 100 || defined(dClippingType_instance) || !defined(dVaryingGroup)\n            varying float vClipping;\n        #else\n            flat in float vClipping;\n        #endif\n    #endif\n#endif\n\n#if defined(dColorMarker)\n    uniform vec3 uHighlightColor;\n    uniform vec3 uSelectColor;\n    uniform vec3 uDimColor;\n    uniform float uHighlightStrength;\n    uniform float uSelectStrength;\n    uniform float uDimStrength;\n    uniform int uMarkerPriority;\n    uniform float uMarkerAverage;\n#endif\n\n#if defined(dNeedsMarker)\n    uniform float uMarker;\n    #if __VERSION__ == 100 || defined(dMarkerType_instance) || !defined(dVaryingGroup)\n        varying float vMarker;\n    #else\n        flat in float vMarker;\n    #endif\n#endif\n\n#if defined(dRenderVariant_colorDpoit)\n    #define MAX_DPOIT_DEPTH 99999.0 // NOTE constant also set in TypeScript\n    uniform sampler2D tDpoitDepth;\n    uniform sampler2D tDpoitFrontColor;\n#endif\n\nvarying vec3 vModelPosition;\nvarying vec3 vViewPosition;\n\nuniform vec2 uViewOffset;\nuniform float uModelScale;\n\nuniform float uNear;\nuniform float uFar;\nuniform float uIsOrtho;\n\nuniform bool uFog;\nuniform float uFogNear;\nuniform float uFogFar;\nuniform vec3 uFogColor;\n\nuniform float uAlpha;\nuniform float uPickingAlphaThreshold;\nuniform bool uTransparentBackground;\n\nuniform bool uDoubleSided;\nuniform float uInteriorDarkening;\nuniform bool uInteriorColorFlag;\nuniform vec3 uInteriorColor;\nbool interior;\n\nuniform float uXrayEdgeFalloff;\nuniform float uCelSteps;\nuniform float uExposure;\n\nuniform mat4 uProjection;\n\nuniform int uRenderMask;\nuniform bool uMarkingDepthTest;\n\nuniform sampler2D tDepth;\nuniform vec2 uDrawingBufferSize;\n\nfloat getDepthPacked(const in vec2 coords) {\n    return unpackRGBAToDepth(texture2D(tDepth, coords));\n}\n\nfloat getDepth(const in vec2 coords) {\n    #ifdef depthTextureSupport\n        return texture2D(tDepth, coords).r;\n    #else\n        return unpackRGBAToDepth(texture2D(tDepth, coords));\n    #endif\n}\n\nfloat calcDepth(const in vec3 pos) {\n    vec2 clipZW = pos.z * uProjection[2].zw + uProjection[3].zw;\n    return 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\n\n// \"Bump Mapping Unparametrized Surfaces on the GPU\" Morten S. Mikkelsen\n// https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf\nvec3 perturbNormal(in vec3 position, in vec3 normal, in float height, in float scale) {\n    vec3 sigmaS = dFdx(position);\n    vec3 sigmaT = dFdy(position);\n\n    vec3 r1 = cross(sigmaT, normal);\n    vec3 r2 = cross(normal, sigmaS);\n    float det = dot(sigmaS, r1);\n    if (det == 0.0) return normal;\n\n    float bs = dFdx(height);\n    float bt = dFdy(height);\n\n    vec3 surfGrad = sign(det) * (bs * r1 + bt * r2);\n    return normalize(abs(det) * normal - scale * surfGrad);\n}\n\nfloat hash(in float h) {\n    return fract(sin(h) * 43758.5453123);\n}\n\nfloat noise(in vec3 x) {\n    vec3 p = floor(x);\n    vec3 f = fract(x);\n    f = f * f * (3.0 - 2.0 * f);\n\n    float n = p.x + p.y * 157.0 + 113.0 * p.z;\n    return mix(\n        mix(mix(hash(n + 0.0), hash(n + 1.0), f.x),\n            mix(hash(n + 157.0), hash(n + 158.0), f.x), f.y),\n        mix(mix(hash(n + 113.0), hash(n + 114.0), f.x),\n            mix(hash(n + 270.0), hash(n + 271.0), f.x), f.y), f.z);\n}\n\nfloat fbm(in vec3 p) {\n    float f = 0.0;\n    f += 0.5 * noise(p);\n    p *= 2.01;\n    f += 0.25 * noise(p);\n    p *= 2.02;\n    f += 0.125 * noise(p);\n\n    return f;\n}\n\n#ifdef dXrayShaded\n    float calcXrayShadedAlpha(in float alpha, const in vec3 normal) {\n        #if defined(dXrayShaded_on)\n            alpha *= 1.0 - pow(abs(dot(normal, vec3(0.0, 0.0, 1.0))), uXrayEdgeFalloff);\n        #elif defined(dXrayShaded_inverted)\n            alpha *= pow(abs(dot(normal, vec3(0.0, 0.0, 1.0))), uXrayEdgeFalloff);\n        #endif\n        return clamp(alpha, 0.001, 0.999);\n    }\n#endif\n";
