text: /**
   * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
   *
   * @author David Sehnal <david.sehnal@gmail.com>
   */
  export var float_to_rgba = "\n    // floatToRgba adapted from https://github.com/equinor/glsl-float-to-rgba\n    // MIT License, Copyright (c) 2020 Equinor\n\n    float shiftRight (float v, float amt) {\n    v = floor(v) + 0.5;\n    return floor(v / exp2(amt));\n    }\n    float shiftLeft (float v, float amt) {\n        return floor(v * exp2(amt) + 0.5);\n    }\n    float maskLast (float v, float bits) {\n        return mod(v, shiftLeft(1.0, bits));\n    }\n    float extractBits (float num, float from, float to) {\n        from = floor(from + 0.5); to = floor(to + 0.5);\n        return maskLast(shiftRight(num, from), to - from);\n    }\n\n    vec4 floatToRgba(float texelFloat, bool littleEndian) {\n        if (texelFloat == 0.0) return vec4(0.0, 0.0, 0.0, 0.0);\n        float sign = texelFloat > 0.0 ? 0.0 : 1.0;\n        texelFloat = abs(texelFloat);\n        float exponent = floor(log2(texelFloat));\n        float biased_exponent = exponent + 127.0;\n        float fraction = ((texelFloat / exp2(exponent)) - 1.0) * 8388608.0;\n        float t = biased_exponent / 2.0;\n        float last_bit_of_biased_exponent = fract(t) * 2.0;\n        float remaining_bits_of_biased_exponent = floor(t);\n        float byte4 = extractBits(fraction, 0.0, 8.0) / 255.0;\n        float byte3 = extractBits(fraction, 8.0, 16.0) / 255.0;\n        float byte2 = (last_bit_of_biased_exponent * 128.0 + extractBits(fraction, 16.0, 23.0)) / 255.0;\n        float byte1 = (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0;\n        return (\n            littleEndian\n                ? vec4(byte4, byte3, byte2, byte1)\n                : vec4(byte1, byte2, byte3, byte4)\n        );\n    }\n";
  //# sourceMappingURL=float-to-rgba.glsl.js.map