From your code, it looks like what you are doing is:
Rotate water plane on it's side.
Render view.
Rotate water plane back.
Render view.
So why would you expect to see only the water plane rotated 90 degrees on it's side? You _should_ expect to see only the water plane laying flat on the ground.
As for why you are seeing both, there is one thing I can think of which would cause that.
And that is doing something a little different thaan the HOM effec tI described. Instead of clearing the zbuffer, and leaving the colro buffer intact, you're leaving both intact.
Thus, when you render the second camera view, everyhting in the scene is zbuffered with what was there before (the water plane rotate 90 degrees) and then you display that, and then you clear the buffer just before rendering the water at 90 degrees again for the shadow cam.
Rotate water plane on it's side.
Render view.
Rotate water plane back.
Render view.
So why would you expect to see only the water plane rotated 90 degrees on it's side? You _should_ expect to see only the water plane laying flat on the ground.
As for why you are seeing both, there is one thing I can think of which would cause that.
And that is doing something a little different thaan the HOM effec tI described. Instead of clearing the zbuffer, and leaving the colro buffer intact, you're leaving both intact.
Thus, when you render the second camera view, everyhting in the scene is zbuffered with what was there before (the water plane rotate 90 degrees) and then you display that, and then you clear the buffer just before rendering the water at 90 degrees again for the shadow cam.