Complex sentence: Farley was originally cast as the voice of Shrek in the movie "Shrek", recording about 80--90% of the character's dialogue, but died just before recording was finished.
Split into simpler sentences: Farley was originally cast as the voice of the title in the movie "Shrek". He recording about 80--90% of the character's dialogue, but died shortly before recording was finished.