Amplifying your potential.
Page 1 of 1

Screen Depth giving me artifacts in Intersection Shader

PostPosted: Sat Jun 09, 2018 10:20 pm
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

Re: Screen Depth giving me artifacts in Intersection Shader

PostPosted: Mon Jun 11, 2018 1:31 pm
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!

Re: Screen Depth giving me artifacts in Intersection Shader

PostPosted: Fri Jun 15, 2018 1:24 am
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

Re: Screen Depth giving me artifacts in Intersection Shader

PostPosted: Fri Jun 15, 2018 9:07 am
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!