Fix depth on the perspective ray tracing.