Arjuna said: O Krishna, what is the position of those that neglect the rules of the Vedas, yet worship with faith. Is such worship considered to be in the mode of goodness, passion or ignorance?
Bhagavad Gita - Chapter 17 - Shraddha Traya Vibhaga Yoga - The Yoga Explaining Three Types of Faith
Bhagavan Shri Krishna replied: The faith of the embodied living beings is of three types – goodness, passion and ignorance. That faith arises from their own nature from impressions of previous lives. Please hear about this.
O Bharata, according to their consciousness, all living beings develop a particular type of faith. Indeed, a person is made of his faith.
Those in goodness worship the demigods; those in passion worship the spirits of the ancestors and those in ignorance worship ghosts.
Out of pride and egotism, those who are ignorant undergo severe austerities that have no basis in the Vedas. Driven by lust, ambition and the desire for power, they torture the body and thus they also torture Me who resides within the body – know that such persons are of the nature of asuras.
The food that people enjoy as well as the methods of sacrifice, austerity and charity are also of three types. Listen now about the distinctions between them.
Food that increase ones life, energy, strength, health, happiness and satisfaction, that is succulent, fatty, wholesome and appealing is dear to those in the mode of goodness.
Food that is too bitter, too sour, too salty, too hot, too pungent, too dry and creates a burning sensation within, causes pain, sorrow and disease. Such food is dear to those in the mode of passion.
Food that is stale, tasteless, foul-smelling, rotten, left by others and unfit for sacrifice is dear to those in the mode of ignorance.
Sacrifices that are resolutely performed according to Vedic injunctions, by those who have no desire for any personal gain are said to be in the mode of goodness.