Screen Depth giving me artifacts in Intersection Shader

Node-based Shader Editor
Post Reply
euclidliptis
Posts: 2
Joined: Sat Jun 09, 2018 10:15 pm

Screen Depth giving me artifacts in Intersection Shader

Post by euclidliptis »

I'm kind of new to this, so if this is just me being an idiot please let me know.

I'm not sure why these artefacts are appearing. It happens with any mesh I put it on. ALso happens with deferred as well with screen depth normals enabled.

Image
Image
Image
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Screen Depth giving me artifacts in Intersection Shader

Post by Amplify_Borba »

Hey there, thank you for getting in touch and for your support!

It's likely related to having the Cull Mode set to Off and, since the Blend Mode is transparent, those artifacts are caused by the intersection of back-facing and front-facing polygons, which is expected since transparent surfaces have no concept of depth.

It's quite tricky to remove these artifacts on a Standard Surface shader, as they appear as a result of sorting issues where some back faces are rendered after the front faces.

You can play around with the Switch by Face and Face nodes to minimize the artifacts as these nodes indicate whether you are rendering front or back faces but two separate passes should be used, one for rendering front faces and another one for back faces, for this to be correctly dealt with.

Please let me know if this helps, 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!
euclidliptis
Posts: 2
Joined: Sat Jun 09, 2018 10:15 pm

Re: Screen Depth giving me artifacts in Intersection Shader

Post by euclidliptis »

Well I'm following some shader code written by a friend, and it's basically the same, and he is getting his to work somehow, but I'll try the face nodes and see how that goes
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Screen Depth giving me artifacts in Intersection Shader

Post by Amplify_Borba »

Please let us know how that works out for you, and do 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!
Post Reply