Unity version: 5.1.1p3
I’m having a minor problem with WaterProDaytime. The blue sky is poking through my shorelines even though the water mesh and the land mesh are solidly poking through each other all the way around the shoreline. This is barely visible here, but during game play it’s a lot more pronounced because the blue pixels look like they’re shooting up and down the coastline really fast when the boat rolls.

I think I can fix this by putting some dark, box mesh that extending around the perimeter of the terrian and pokes down, so where the holes are you see that background. I’m wondering if there might be a better way.
The WaterPro script(Water.cs) has a parameter called Clip Plane Offset. Tuning that value might help you.
Thanks, I didn’t mess with that variable because I didn’t know what it did.
Increasing it helps a little (sort of) if I go to really large numbers (around 1), but it isn’t really satisfactory in my case because then there are no reflections close up (outside the boat view, the reflection is just offset a ton which looks bad, or it disappears which looks worse).
Even at a value near 1 the “sky pixels” are still visible, albeit not quite as much. I looked at the shader but don’t understand how it ends up picking what appears to be a sky pixel. That’s probably not what it’s really doing but visually it looks like that. It seems like it somehow misses hitting either the water plane or the terrain which intersect around the shoreline.
If nobody has any other ideas, I’ll just have to add meshes to try to darken out those areas so it’s not so obvious. On the Oculus Rift it looks especially bad because the pixelation is so much more visible.
One other question if I may while I’ve got someone’s attention:
The reflection of the sky on the water in the Oculus Rift doesn’t work correctly (never has). It’s very visible when you look a little bit up above the horizon line, you can see a swath of grey swoop down over the water. For whatever reason the rotation of the camera is tied into the reflections in a weird way with the Oculus. Is this ever going to be fixed or is there anything I can do to fix it on my end? It’s been this way ever since Rift support was added to Unity.
I was using Water4Example before this and got around the problem by having a constant reflection color that I picked out of the sky. That way no matter which direction you looked, you got the same color. It didn’t look quite as good but it was hard really to see any difference. Might it be possible for me to extend WaterProDaytime to have a single color for the reflection in the same manner? It’s not quite as a good but it looks a heck of a lot better than seeing some grey band swoop over the lake every time you tip your head back a few degrees.
[EDIT: Come to think of it, there’s a reflection map here. I’ll try just making it a solid color and see if that does the trick.]
Nope, that did nothing at all. It seems like it’s reflecting that procedural sky where it’s grey around the horizon. Something like that anyway. Top pic is ok, but the bottom where I’m looking up slightly above the horizon is not.
If for whatever reason this isn’t something that can or will ever be fixed, it’d be nice to have the option of using a solid color there instead. This is very distracting in the Rift otherwise.
Here’s one part of a lake where the shoreline is pretty far away and there’s no sky pixel stuff at all. It works perfectly there.
On a more positive note, I’m amazed to see that with the latest version I can run a real time reflection probe on the Rift. The performance is really great. Not one hiccup in frame rate, just beautiful smoothness everywhere. 
On the reflections:
In Unity’s Water.cs file there’s a section for setting up the reflection cam:
// Render reflection if needed
if (mode >= WaterMode.Reflective)
{
// Reflect camera around reflection plane
float d = -Vector3.Dot(normal, pos) - clipPlaneOffset;
Vector4 reflectionPlane = new Vector4(normal.x, normal.y, normal.z, d);
Matrix4x4 reflection = Matrix4x4.zero;
CalculateReflectionMatrix(ref reflection, reflectionPlane);
Vector3 oldpos = cam.transform.position;
Vector3 newpos = reflection.MultiplyPoint(oldpos);
reflectionCamera.worldToCameraMatrix = cam.worldToCameraMatrix * reflection;
// Setup oblique projection matrix so that near plane is our reflection
// plane. This way we clip everything below/above it for free.
Vector4 clipPlane = CameraSpacePlane(reflectionCamera, pos, normal, 1.0f);
reflectionCamera.projectionMatrix = cam.CalculateObliqueMatrix(clipPlane);
reflectionCamera.cullingMask = ~(1 << 4) & reflectLayers.value; // never render water layer
reflectionCamera.targetTexture = m_ReflectionTexture;
GL.invertCulling = true;
reflectionCamera.transform.position = newpos;
Vector3 euler = cam.transform.eulerAngles;
reflectionCamera.transform.eulerAngles = new Vector3(-euler.x, euler.y, euler.z);
reflectionCamera.Render();
reflectionCamera.transform.position = oldpos;
GL.invertCulling = false;
GetComponent<Renderer>().sharedMaterial.SetTexture("_ReflectionTex", m_ReflectionTexture);
}
After looking at the shader (not my strong point) I thought maybe there might be something not quite right here, but I don’t see it. The reflections are right everywhere except for the sky, after all. For some reason the sky reflection just goes haywire with the Oculus Rift, like the rotation around the x axis is reversed or something.
Anyone have any ideas? This adversely effects every Unity project that uses water and the Rift in a big way, not just mine.
Posted a bug report just now. (Case 720390) Oculus Rift Water Sky Reflection Problem
Concerning the original problem with the shorelines, if I put a couple of black planes way out in the distance, the blue pixels along the shoreline completely disappear. Here I’ve got the planes raised quite a bit so you can see them along the skyline. They don’t really need to go that high, they just have to be visible through “the crack at the shoreline,” so to speak.
So if it can get the color of those planes and put black where the sky blue was, why can’t it get the color of the terrain in those areas? It’s as though it completely misses the terrain mesh in the rendering somehow.
Hi!
I am also experiencing problems with the use of WaterProDayTime in Unity3D 5.43f1 and Oculus Rift. I have tried adjusting the clip plane offset and the refraction parameters to obtain a realistic water reflection, but the settings of the clip plane do not create good reflections when using Oculus Rift (they do look good without Oculus Rift).
The first screenshot is with Oculus Rift, the second screenshot without Oculus Rift at the same clip plane offset.
Has anybody discovered what goes wrong with water reflections in VR?
Thanks!
Sorry to say I never made any headway with this one.