Hello,
Sorry for my english,
I have 2 methods for rendering reflection of water. On the screenshot you can see cubemap and screen space reflection. If I use cubmap then I get the correct image. For flat reflections(ssr/planar), I always see the formula
tex2D (reflectionTex, screenPos.xy + normal.xz);
in other projects, like a water from ue4/cryengine/unity/custom waters etc.
But this formula is completely incorrect, since the normals do not use the real displacement along the Y axis. For correct reflection, I use a this formulahalf3 reflectionRay = reflect (viewDir, normal);
float4 ssr = tex2D (reflectionTex, float2 (reflectionRay.x * 0.5 + 0.5, reflectionRay.y + 0.5));
I want to get the right reflection like on the left side of the picture.
I don't understand how to fix perspective distortion for flat reflection (e.g. planar reflection / screen space reflection). Is any advices?