threepipe
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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