DOF examples broken

Description of the problem

As of r76, THREE.DepthMaterial encodes the depth in NDC rather than a random hard-coded range. The DOF effect examples were apparently not updated and still assume it to work the old way.

Checking showFocus on the GUI of webgl_camera_cinematic exposes the problem most clearly. The expected behavior is that moving the mouse over an object highlights all objects at a similar depth and also sets the focus to that depth. Instead, weird things happen.

Three.js version
  • Dev
  • r76
  • no others
Browser
  • All of them
OS
  • All of them

Author: Fantashit

1 thought on “DOF examples broken

  1. My fault. I’ll have a look soon. It should be a simple function to add to do the decoding properly.

Comments are closed.