Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Water rendering bugs #1

Open
renaudbedard opened this issue Jun 22, 2016 · 2 comments
Open

Water rendering bugs #1

renaudbedard opened this issue Jun 22, 2016 · 2 comments

Comments

@renaudbedard
Copy link
Contributor

Just tested the latest version on my DK2 + Windows 10 setup (I compiled from source so I downloaded the latest Steam VR Unity package as well), and the water rendering seems unhappy... :(

giphy

I'm not sure if that's a shadow or a reflection, but it seems locked to camera's yaw with its pitch.
I have no idea what's going on.

@0x0ade
Copy link
Owner

0x0ade commented Jun 22, 2016

The water shader is using the depth buffer to differentiate between sky / background and level / foreground. Unfortunately it seems to flip spontaneously - I've had the same issue when enabling the deferred rendering path and in the editor view.

https://github.com/0x0ade/HoloFEZ/blob/master/Assets/FezUnity/Shaders/Water.shader#L67-69

#ifdef UNITY_UV_STARTS_AT_TOP
depthpos.y = depthpos.w - depthpos.y;
#endif

Checking for UNITY_UV_STARTS_AT_TOP should fix the problem, yet it doesn't. I'll try to detect the need to flip manually.

@0x0ade
Copy link
Owner

0x0ade commented May 18, 2017

I updated to Unity 5.6f3, rechecked this... and experienced the same issue consistently, not flipping arbitrarily anymore.

The small maintenance update (917be82) should fix this issue.

No guarantees that it'll still work with VR as I can't test it anymore. Toggling between "VR" and "non-VR" controls can be enabled by pressing v, though. (Unrelated issue, OpenVR.IsHmdPresent() returns true even though no HMD is present.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants