- (depth (- far near)))
- (when (and (< far 0) (> distance focal-length))
- (setq far most-positive-short-float)
- (setq depth most-positive-short-float))
+ (depth (when far (- far near))))
+ (when (or (>= distance hyperfocal)
+ (and (null far) (>= distance (* hyperfocal 0.99))))
+ (setq near (/ hyperfocal 2)
+ far most-positive-short-float
+ depth most-positive-short-float))