Page 1 of 1

Depth Fade node not working VR with LWRP

PostPosted: Thu Oct 11, 2018 6:03 am
by renardmf
Hello,

I have a shader working now that works fine in edit mode and game mode that fades out based on how close the camera is to the object but for some reason when I add the Depth Fade node into the mix I am getting weird artifacting in the transparent part of the shader. This seems to be related somehow to depth issues from the stereo camera since the artifacts look like the objects that this object with this shader applied is trying to draw on top of. I am currently using single-pass VR within the LWRP in Unity 2018.3b5.

Attached a copy of the shader.

Thanks in advance!

Re: Depth Fade node not working VR with LWRP

PostPosted: Thu Oct 11, 2018 2:22 pm
by Amplify_Borba
Hello! Could you try placing a Saturate node right after the Depth Fade, and let me know if you get the expected results?

Thanks!

Re: Depth Fade node not working VR with LWRP

PostPosted: Thu Oct 11, 2018 7:57 pm
by renardmf
Hmm, I think it helped a little but I am still seeing these kind of artifacts here:

Image

Whereas the fog on the left should be more of the solid gray color but seems to be showing some of the geo on the right of the object.

I thought it might be related to this post I found here but I wasn't too sure:

https://gamedev.stackexchange.com/quest ... ion-matrix

Thanks again for your help!

Re: Depth Fade node not working VR with LWRP

PostPosted: Fri Oct 12, 2018 10:09 am
by Amplify_Borba
Thank you for sharing the article!

We're not entirely sure if there is any issue with the extraction of depth values in VR, but I've passed this information to the developer, including the article, so that we can investigate if there's any issue in this specific scenario, and if there's anything that can be done on our side if that's the case.

It would help us immensely if you could provide us with a sample that has the issue present, so that we can use the same data that you're using.

We'll definitely get in touch if we have any developments, please let us know if you have any further questions, thanks!