Has anyone got any tips or examples of a working water shader for the Oculus Quest/Go or similar Mobile VR platforms? I was writing my own but had issues getting depth from the camera in single pass (maybe for obvious reasons). Also tried creating a water shader in shader graph on LWRP which only rendered in one eye(!).
I am currently working with built-in renderer for the time being so anything that works with that would be neat, am happy to share any findings I have!
This is currently what I get when I add a water material that uses Reflection and Refraction to my scene, see how the textures per-eye are different and the reflections are also offset.
Apparently this is a bug with Unity and I will report it today
I was able to use Shader graph in UniversalRP to make wonderful looking water, but I could never get anything to look right or work in Built-in renderer. I have reported all my issues as bugs to Unity so hopefully they can eventually fix it. The asset store creators of water materials I spoke to reported their issues to so it’s either a case of moving to UniversalRP or waiting for a fix in built-in renderer.
Personally for us we cannot use UniversalRP(LWRP) yet as Fixed Foveated Rendering on the Oculus quest is broken with it another bug!
Ugh! This is why it’s so frustrating to be a developer right now. It seems as though with Unity they want you to move forward with LWRP (URP) but nothing works well together.
Did you follow a tutorial on the Universal RP water, or make it yourself from scratch? If you followed a tutorial or have other good resources on the web, could you post them?
@ROBYER1_1 Are you able to compile on the Quest with 2019.3? I tried with the beta and got a “NullReferenceException: Object reference not set to an instance of an object” error at the end of the compile. I was thinking “it was just me, this is a beta, etc.”. So I went back to 2019.2.6 and started a new project to work on the water shader (thanks again!!). I went through developing the shader on the Rift but I then wanted to see performance on the Quest, so I changed the project to android, etc., and compiled, only to get the same NullReferenceException error.
I’ve replaced/rebuilt the android manifest file and done all the normal fixes. I just can’t get it to compile.
Hi, I appreciate your response but also nullreference issue could apply to a lot of things such as a script in a scene missing a reference or something broken in the render pipeline or shader itself, can you please share a screenshot of what you are seeing?
Sorry for my late response, I was out at the end of the week last week. Also, thanks for your willingness to help others!
Here are some screenshots from my compile. The scene is not that complex or anything. I have gone through the steps of setup like always, including the deleting/recreating the manifest. It appears that my fail is near the end of the compile
And here are two other screenshots, one of them is the error in the console, and when I click on that error, it leads me to “OculusBuildProcessor.cs” which apparently is an error from parsing the manifest?
Well, I found the answer. I had seen where someone else was having this issue on the Oculus forums, and just checked where someone had replied. I had “V2 Signing” checked in the build settings, which was causing the failure. I’m keeping this up there and wanted to post the solution in case others had the same issue.
Weird, I had the same error trying to build with multiple versions of 2019.2… not sure what started it, but it happened after I added terrain I think. I was able to build by just using the “Build” option rather than “Build and Run” in 2019.2.10, and then just moving the apk over with console commands. I left “V2 Signing” on though, as I thought it was required for the app to be store-ready.
edit: I still get the errors intermittently, but never that pop-up warning and generally the build is still successful.
Hello, i’m running into issues aswell with the Oculus Quest. So, simple questions, is it possible as for today :
with URP, to use the opaque texture ?
7.1.8
singlepass : mesh isn’t displayed.
multipass : mesh is displayed on left eye, right eye is black
For both mode, I don’t have 72 fps as soon as i activate the opaque texture, even at 1/4 res.
7.3.1
singlepass : mesh isn’t displayed.
multipass : works, slow as hell (downsized 4x)
For both mode, I don’t have 72fps as soon as i activate the opaque texture, even at 1/4 res.
with Built-in, to use the grabpass in singlepass ?
singlepass : mesh isn’t displayed in left eye, right eye totally bugged.
multipass : works, slow but better than URP.
Any workaround ?
They did it in Red Matter, so the Quest can handle it somehow. They used Unreal tho.
Thanks for your answers !
I had great results for a water material using URP and shader graph with some shader graph wizardry. No need for Opaque texture what do you need Opaque texture for? Depth was all I needed for the depth of water effect (opacity).