I think this movie came out in the early to mid '00s. Pretty sure it's not newer than 2008: I think I saw it around that time. I later forgot the title, and I've been unsuccessful finding it again by Googling for plot keywords.
I think it's a really good film, so I'm putting the spoilery bits I remember in spoiler tags.
The movie opens with a military team of humans who've crash-landed on an alien planet. The backstory is explained that humans are at war with a race of mind-controlling aliens who have been almost wiped out, except on this one last planet, and this team was sent to finish the job. The captain of their mission team was killed in the crash, and the rest have to make do to complete their mission. As they explore the mostly jungle planet they keep seeing these crystal (as I remember it) growths around and have these strange hallucinations because of the aliens' mind control.
The humans are actually under the mind control influence of the aliens the entire time. The crystals on this planet partially block the telepathy which is why everyone's suffering from hallucinations: they're real memories creeping through. It turns out the human-alien war was lost long ago and this planet has the last holdouts of the free human population, and the team was sent to try to kill them off. At the end, they encounter the clone of their old captain as one of the residents of the human colony, and one of the aliens telepathically admits what's going on.