Reflections and cut planes

I have made a pond that is supposed to reflect the environment around it. It should also reflect things in the pond, any that floats on the surface (or half sub-merged), or breaks the surface, such as boats, rocks sticking up etc. Basically it should reflect the entire scene that sits above the surface level.

I have managed to set up a reflection camera that follows the main camera, but below the surface. It’s result is used as a texture when rendering the water surface. I get something close to what I want, but I still have a couple of problems:

  1. When I render with the reflection camera I only want to render the scene above the surface. Things below the surface should not be reflected. How do I create a cut plane in Playcanvas? I could apply a fragment shader and ignore fragments below world-coordinate y < 0, but it needs to be more general. I don’t want to create and edit shaders for all objects in the pond.

  2. How do I select which objects to be seen by a certain camera? Can this be controlled easily? Right now I get warnings like “source and destination textures of the draw are the same”. I guess it’s because the reflection camera also sees the water surface (although practically speaking it’s not seen from below the surface).

Regarding #2 - you cannot render to the same texture while using that texture.
In your case, preventing water plane to be rendered for reflection camera - will solve issue. But how to hide it from that camera, I’m not sure, someone else would need to answer on that.