Sobel Depth

Your feedback is very important to us. We are listening.

Sobel Depth

Postby zamboni » Tue May 01, 2018 12:05 am

Hi there. Not sure if this should go in this section or not, so sorry in advance.

I've been further extending my intersection shader to show sobel inside the sphere, and this is using the built-in SobelMain shader function provided by Amplify. I modified it to read screen color directly instead of having to sample a texture.
Image

Problem is, it's checking color differences it seems, and that's causing the sobel effect to appear on shadows, and with any kind of significant color change on a texture (you can read the generator's High Voltage sign)

Is there a way I could stop this, like doing sobel based on depth?
zamboni
 
Posts: 7
Joined: Mon Apr 02, 2018 8:40 pm

Re: Sobel Depth

Postby zamboni » Tue May 01, 2018 4:47 am

I believe I could do it if I could access _CameraDepthNormalsTexture from ASE, but I'm not sure how to do that.
I'd like to sample the normals of all pixels on the screen, but I don't know how to change that.
zamboni
 
Posts: 7
Joined: Mon Apr 02, 2018 8:40 pm

Re: Sobel Depth

Postby Ricardo Teixeira » Wed May 02, 2018 1:47 pm

zamboni wrote:I believe I could do it if I could access _CameraDepthNormalsTexture from ASE, but I'm not sure how to do that.
I'd like to sample the normals of all pixels on the screen, but I don't know how to change that.


Hello,

Thank you for reaching out to us, we would be happy to help.

Have you had the chance to try using a Global Variable? I attached a Shader Function to this thread that should provide a good starting point for your requirements; be sure to let us know if that is not the case.

I recommend checking the Edge Detect sample posted on the ASE Unity Forum for additional information.

Thanks!

All the best,
Ricardo Teixeira
@amplifycreates
Attachments
DepthNormals.zip
(1.47 KiB) Downloaded 359 times
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests