/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{glsl as e}from"../../shaderModules/glsl.js";function o(o){o.code.add(e`vec3 encodeNormalizedDepthToRGB(float normalizedDepth) {
float depth24 = normalizedDepth * 16777215.0;
float high = floor(depth24 / 65536.0);
depth24 -= high * 65536.0;
float mid = floor(depth24 / 256.0);
float low = depth24 - mid * 256.0;
return vec3(high, mid, low) / 255.0;
}`),o.code.add(e`float decodeRGBToNormalizedDepth(vec3 rgb) {
rgb *= 255.0;
float depth = rgb.r * 65536.0 + rgb.g * 256.0 + rgb.b;
depth /= 16777215.0;
return depth;
}`)}export{o as RgbNormalizedDepthEncoding};
