Depth Fade node not working VR with LWRP

Node-based Shader Editor

Depth Fade node not working VR with LWRP

Postby renardmf » Thu Oct 11, 2018 6:03 am

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!
Attachments
Fog.zip
(5.37 KiB) Downloaded 97 times
renardmf
 
Posts: 4
Joined: Mon Sep 10, 2018 9:48 pm

Re: Depth Fade node not working VR with LWRP

Postby Amplify_Borba » Thu Oct 11, 2018 2:22 pm

Hello! Could you try placing a Saturate node right after the Depth Fade, and let me know if you get the expected results?

Thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Depth Fade node not working VR with LWRP

Postby renardmf » Thu Oct 11, 2018 7:57 pm

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!
renardmf
 
Posts: 4
Joined: Mon Sep 10, 2018 9:48 pm

Re: Depth Fade node not working VR with LWRP

Postby Amplify_Borba » Fri Oct 12, 2018 10:09 am

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!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron