Hi all. I am using a grass solution created by MinionsArt in my VR game for Quest 2 and added the work to make it work with singlepass rendering. However when I build my game and load it on the Quest 2 the moment the grass is enabled on the build the left eye seems to start glitching when I move my head around. The image seems to jitter a bit (this does not show up on a recording).
I have added a zip with the source code used and a image I created in photoshop to show the effect while moving around.
I hope someone is able to help me find a possible solution so I can have beautiful grass! I am using 2021.3.17f but also tried .16f. I also tried enabling / disabled all graphics and it is really the grass creating my issue.
Lighting:
All lighting (Main and additional) is disabled.
Shadows:
Max distance: 0
Working unit: percent
Cascade count: 1
Last border: 20
Depth bias: 1
Normal bias: 1
Soft shadows: Enabled (Dynamic shadows are not really used)
Might have the answer, but I am running on limited knowledge of your VR build settings. This issue appears when the shader is not properly supported by Unity XR with their either URP or HDRP as shaders are rendered differently using VR. Getting around this requires extended coding knowledge and you have to know what you are doing when developing this.
I can only refer back to this post without knowing what your settings are : Issues in Virtual Reality · Issue #13 · ColinLeung-NiloCat/UnityURPUnlitScreenSpaceDecalShader · GitHub
There might be some more good explanations there to why your problem is appearing.
Best of luck!
Thank you so much for answering! Good note that my settings might influence behavior so let me share these here as well (I will also update the original post).
Lighting:
All lighting (Main and additional) is disabled.
Shadows:
Max distance: 0
Working unit: percent
Cascade count: 1
Last border: 20
Depth bias: 1
Normal bias: 1
Soft shadows: Enabled (Dynamic shadows are not really used)
After some thought I find it weird that it cannot show up on a recording, which means it only shows in the headset… Or? There’s different ways to record Quest image output, either show both eyes, 1 eye or directly from the computer. All in all I think the shader is just not properly coded to support VR/ your headset. If you are trying to use a shader made by someone outside of Unity I would contact them and ask for support to make it work with your project.
I tried contacting to no avail and tried converting the shader myself. It seems to only happen on the quest 2 native build version indeed. I will try to record the left eye natively and hope to capture it that way.
Study their solution/logic and read up on how shaders are implemented for the Quest2 and you might just fix your problem. Sounds like a pain in the *** but I don’t think this is anything else than just some fiddling about and you’ll make it work. if not, make your own shader that will work for you!
I have found a solution for the issue with the compute shader by upping the instance count to two, but now a weird screen tear effect is present with the object on.