Performance and motivation

When has your level of performance been directly affected by your motivation? By your ability? By the environment?