Depth Fade
Posted:
Tue Jan 22, 2019 9:32 am
by Takamba
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
Re: Depth Fade
Posted:
Tue Jan 22, 2019 11:13 am
by Amplify_Borba
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
Re: Depth Fade
Posted:
Tue Jan 22, 2019 11:31 am
by Takamba
Well, I dont understand what this code is doing at all.
Where can I find more informations about the depth buffer?
Re: Depth Fade
Posted:
Tue Jan 22, 2019 11:54 am
by Amplify_Borba
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.