To render your water+shadow pass:
- Select the objects that comprise your dock, then right click and go to Object Properties.
- There is a checkbox for "Visible to Camera." Make sure it is unchecked. This will cause the shadow to still render even though the dock will be invisible. Click OK.
- Render and save the output.
- Optionally, go to Tools -> Manage Scene States and create a new state. Call it "Water" and make sure it includes only Object Properties. This will make it easier to manage this water+shadow pass later on if you have to make any changes.
To render your dock pass:
- Select the dock objects again, if they're not already selected. Right click, go to Object Properties, and make sure "Visible to Camera" is checked. Click OK.
- Select all the other objects in the scene, which should not appear in the dock pass. An easy way to do this is to invert selection, Ctrl+i. Right click and hit Hide Selection. They will no longer be visible in the scene, nor to the renderer (including shadows).
- Again optionally, go to Tools -> Manage Scene States and create a new state called "Dock" and make sure it includes only Object Properties.
- Render and save output.
- If you need to see the hidden objects again, right click in the viewport and select Unhide All.
If you created the two scene states, it will allow you to easily switch between them whenever you need to make a change, and render again without having to go through all the steps. This is especially useful when your separate render passes get complicated. Just remember to save the state again if you make changes to the objects' properties, and to only save Object Properties.