threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DepthBufferPlugin.unpack.glsl 308B

12345678910
  1. #if defined(HAS_DEPTH_BUFFER)
  2. #if DEPTH_PACKING == 3200
  3. #define unpackDepth(rgba_depth) (1.0 - rgba_depth.r)
  4. #elif DEPTH_PACKING == 3201
  5. #define unpackDepth(rgba_depth) unpackRGBAToDepth(rgba_depth)
  6. #endif
  7. uniform sampler2D tDepthBuffer;
  8. #define getDepth(uv) unpackDepth(texture2D(tDepthBuffer, uv))
  9. #endif