Both Descartes and Berkeley had a thesis of mediate perception. These theses however, were not the same. The difference, you see, is in how they perceive physical objects. Descartes develops a somewhat realist view in his meditations while Berkeley argues that his non-realist perception can sufficiently account for anything a realist would be able to with their system of philosophy. Essentially, Berkeley states that what Descartes believes as corporeal is simply a false understanding of the ideas given to him by God.
To further understand this, we have to understand how each man came to these beliefs. Descartes came to the conclusion that he could not trust his senses due to the fact that they weren't totally reliable via a chain of reasoning that held nothing as automatically 'true'. In spite of the fact that his senses were not completely reliable, the fact that they did sense something was proof enough that material existed because that is what his physical senses were limited to.
Now, as Descartes began with the sole fact that he could think, Berkeley began with everything that he perceived is an idea, and the source of these ideas come from a supreme being or God. He firmly believed in physical objects, but they were only manifestations of the ideas given to him by God, not made of material. Likewise interaction with these ideas are ideas also supplied from God. For example, if Berkeley hit a wall, the pain felt was not caused by the wall but by God who is consistent in expensing the idea of pain with the idea of hitting a wall.
Indirect realism explains there is a 'knower', in this case each of the philosophers, and in turn is given an idea of an object. The source of that idea is where the...