Writing to depth buffer with SV_Depth

Node-based Shader Editor

Writing to depth buffer with SV_Depth

Postby andr3warv » Wed Mar 27, 2019 1:18 am

Hi, I've been using Amplify Shader Editor for several months now and I was wondering if there was any way to write to the depth buffer with SV_Depth within ASE or if it required writing the shader manually. I'm attempting to create a custom hair shader and wish to implement something similar to UE4's "per pixel depth' pin to avoid nasty polygon intersection artifacts (which would allow me to blend the hair cards using their heightmaps). I don't see any way to offset the depth other than the per-polygon depth in the properties panel though. Any help would be greatly appreciated.
andr3warv
 
Posts: 1
Joined: Wed Mar 27, 2019 1:11 am

Re: Writing to depth buffer with SV_Depth

Postby Amplify_Borba » Mon Apr 01, 2019 4:52 pm

Hello, thank you for getting in touch and for your support!

Due to a limitation in the surface shaders it won't be possible to accomplish this through them, however, in a vertex/frag template it should be possible although it would require some additional modification in order to ensure that it works.

The HD templates already have the necessary structures for this, but they're only used internally by the HD and we don't provide any port that can modify them.

Could you please provide further information regarding the context in which you want to implement this?
Are you looking to use it specifically in one of the new scriptable render pipelines?
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 7 guests