Personally, I feel that there is an element missing in this sentence. I may be wrong!
Here is my training of thought:
If the occasion is someone's birthday, then "the shape of the cake" is the birthday?, or wedding based on the structure of the sentence?
I am trying to make sense of it by using a parellel:
"Depending on the brand would be the price of the sunglasses". It sounds as pleasing to the ears as finger nails on blackboard, to mine anyway.
I think if the sentence were "Depending on the occasion, the shape of the cake varies" it would have made more sense.
I have no question about the use of "depending on", it's the noun phrase that I am having trouble with ..