-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
Underwater + Metal has some issues #192
Comments
Ha thats cool, thanks for that feedback. We've been giving it a bit of a push to make it run well on switch which I'm sure has helped mobile too! Thats a very odd result. Could you attach the log file from running it? Also are there any errors or warnings when making the build from unity? When stuff looks completely wrong like this its usually something failing to load, and in this case i might be using shader features that arent supported on mobile. |
I reckon those warnings are unrelated to crest: https://issuetracker.unity3d.com/issues/unity-outputs-a-warning-in-a-windows-64bit-standalone-player-when-using-built-in-shaders Does the wireframe option work (top left on the debug gui)? If so could i see a screenshot of the issue with wireframe turned on? It looks like the curtain geometry that renders the underwater effect is dominating the screen. The curtain shoudl turn off completely when the camera is not close to the surface. I assume it stays like that when the camera is raised further? How does it look when the camera is moved under the surface? Ideally with sea floor visible so i can see if the underwater effects are working. The curtain is enabled/disabled based on a water height query which comes from reading back the displacement textures from the gpu. Maybe the readbacks dont work on metal. There should be a rowboat in that scene that is doing height queries for physics - is it happily bobbing away on the water surface? (this test assumes you havent overridden the collision source to e.g. CPU gerstner waves). |
Hi there, thought I'd check in. Any luck with the above? I start to suspect "SV_IsFrontFace" does not work on metal (hence it thinks your underwater all the time). There's a different attribute i guess for opengl called VFACE, and maybe the cross compiling is broken for metal. In addition to the above, could you also try forcing
Thanks in advance |
Hi thanks for checking up :) |
I think I found the issue - it seems like the VFACE attribute is flipped on metal, so the shader thinks its underwater when you're above. someone reports this here: https://answers.unity.com/questions/1262709/shader-semantics-vface-error-in-ios-metal.html . if this is the issue i'll report it to unity. I've just pushed a speculative fix (commit ref'd above), could i trouble you for a confirmation that this works for you? |
Underwater should be working on metal now.
Underwater should be working on metal now.
Hi
First wanted to say that I'm super impressed by this project. I'm using it for a mobile app (iOS), stunned that it runs so smoothly.
I did notice the following visual problem when I enabled the Underwater option in Ocean.mat in the standard scene (main.scene), with Metal enabled under player settings.
If underwater is disabled, all looks (very) good.
The text was updated successfully, but these errors were encountered: