"#ifdef USEDEPTHRGB\n",
" // for 565 RGB we'd need to use different multipliers\n",
"#define decodedepthmacro(d) dot((d).rgb, vec3(1.0, 255.0 / 65536.0, 255.0 / 16777215.0))\n",
-"#define encodedepthmacro(d) (vec4(d, d*256.0, d*65536.0, 0.0) - floor(vec4(d, d*256.0, d*65536.0, 0.0)))\n",
+"#define encodedepthmacro(d) fract(vec4(d, d*256.0, d*65536.0, 0.0))\n",
"#endif\n",
"\n",
"#ifdef VERTEX_SHADER\n",