threepipe
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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