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:
-
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.
-
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).