I tried setting it to double-sided but it didn’t help much. I was hoping to get the expected refraction effect from underneath. Just wondering if there’s an easy workaround, although I did also just find these really nice alternatives that seem worth a try:
Thanks for the link. Cool demo! Before I go digging into the source, would you mind elaborating a bit on how to render the world above the water, if the camera is below the water?
I’ve already got an ‘underwater’ post-processing effect – it’s the rendering of the world, refracted, when the viewpoint is under water that I’m unsure about, and I’m wondering if it’s possible with Water2. Thank you.
Before rendering, render to texture a scene without water. To determine the display of the water line, you need to create another water geometry in the form of a cube and make its waves coincide with the first wave. The outer part of the cube should be black, the inner part of the cube white. Before rendering, you need to render the cube and save it to a texture, so that later in the post effect you can use it for the water line - black color - just a scene, white color - a scene with the color of water. The depth texture is needed to change the color of the water depending on the depth.
I seem to recall that you can make a copy of the water plane, and flip it upside down. set the top to side:THREE.FrontSide and the bottom to THREE.BackSide.
Ahh my bad , forgot to save my edits in the jsfiddle.. link fixed now
When the camera goes below the water the ground mesh still shows up in the refraction even though it’s backside is invisible… easy fix for that was to hide the underwater mesh…