3.2 new Water refraction bug on Windows (work on mac)

Hi,

I just tried the new water coming with 3.2 and the refraction is wrong (look like the grabpass was flipped). I tried the same scene on Mac and it work perfectly.

So we try to understand why and we modify the shader ourself, we just flip the grabpass verticaly in the shader (FX-water3.shader line 268) and it seem to work …
we replace this : float3 txProj = UNITY_PROJ_COORD(uv2);
half4 refr = tex2D(_GrabTexture, float2(0,1) + float2(1,-1) * txProj.xy);

Very strange… Do you reproduce this ?

Now that you mention it, I’m not seeing any refraction and the reflections aren’t looking right at all (and your code doesn’t seem to help on my machine). I suggest you pack up a small example scene and file a bug report. I’ll do the same as I suspect you and I are seeing different (but related) issues.

we are experiencing the same issue !

I also experienced the same thing, but then I realized that the players setting was suddenly changed to forward rendering. After switched back to deffered rendering the issue is gone…well that’s work for me…

@rea - You’re right. I also recall Ole mentioned something about this as well.

It doesn’t look right for me either. I didn’t try using Deferred Lighting though…Windows 7 64-bit, NVIDIA GTS 360m.

@Ayrik - I’m using the same graphics card and OS. Be sure to submit a bug report and include a small project that recreates the issue that way they can track the issue down and fix it.

Ok thanks all, I don’t try defered rendering with my scene because I can’t use this render path for my project but anyway It should work in forward rendering too, so I’ll submit a bug soon.

Jerome:

Previous:

Edit: Well I thought I had this working for me, but ive run into some hickups.
First: Another bit needs updating, the Underwater frag reflection.
Around line 550 (fragUnderwater)

refl = tex2Dproj(_GrabTexture, UNITY_PROJ_COORD(uv1));

To

float3 txProj = UNITY_PROJ_COORD(uv1);
txProj /= txProj.z;
refl = tex2D(_GrabTexture, float2(0,1) + float2(1,-1) * txProj.xy);

Second: Using these fixes makes the deferred rendering flip upside-down. :expressionless:
Off the top of my head I don’t know of any # conditionals to check for forward vs deferred, or even if its possible to check from the shader. I’ll post more as I discover more. :wink: