Bhagavad Gita, Chapter 17, Verse 12
That which is performed, O best of the Bhâratas, seeking for fruit and for ostentation, know it to be a Râjasika Yajna.
The same act, sacrifice, is shown here turning into something real different once the motive shifts.
Krishna doesn't judge the ritual itself, he judges what's actually being sought through it. Real difference between goodness and passion here comes down entirely to intention.