Depth Fade

Node-based Shader Editor

Depth Fade

Postby Takamba » Tue Jan 22, 2019 9:32 am

Hi all

How does the Depth Fade Node calculate the distance to geometrie behind the surface it is attached to?

Perpendicular to the camera plane, or along the normals of the surface it is attached to?

An explanation is much appreciated.

Regards,
Phil
Takamba
 
Posts: 5
Joined: Tue Dec 04, 2018 10:23 am

Re: Depth Fade

Postby Amplify_Borba » Tue Jan 22, 2019 11:13 am

Hello! Internally, the node calculates the distance value by subtracting the Surface Depth by the value fetched on the Depth buffer.

You can also check all specific operations done by each node by examining its code, in this case you can find the script in the following path: AmplifyShaderEditor\Plugins\Editor\Nodes\HelperFuncs\DepthFade.cs
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

Postby Takamba » Tue Jan 22, 2019 11:31 am

Well, I dont understand what this code is doing at all.

Where can I find more informations about the depth buffer?
Takamba
 
Posts: 5
Joined: Tue Dec 04, 2018 10:23 am

Re: Depth Fade

Postby Amplify_Borba » Tue Jan 22, 2019 11:54 am

There are many good sources of information including the Shaders and Effects Cookbook, Nvidia's GPU Gems, LearnOpenGL, Z-Buffering and Unity's documentation.

Since shader knowledge is interchangeable, all sources of information, even from other engines, can be useful to learn more about its intricacies.
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 8 guests