Unity Products:Amplify Shader Editor/Surface Depth: Difference between revisions

From Amplify Creations Wiki
Jump to navigation Jump to search
ampwiki>Amplify RnD Rick
No edit summary
 
m (1 revision imported)
 
(No difference)

Latest revision as of 00:06, 2 December 2023

Back to Node List

Surface Depth Node

The Surface Depth node outputs the distance between the object surface and the camera. It can be set in a [0,1] range or use its real value directly in View Space range by changing the View Space parameter.
NOTE: The distance value is obtained by transforming each vertex position into view space and returning its Z value thus it's not dependent on the Depth buffer.


Nodes used: Surface Depth

Node Parameter Description Default Value
View Space Defines how the distance value between camera and surface is to be presented
  • Eye Space: Real distance value between camera and surface
  • 0-1 Space: Distance value in a linear [0,1] range
Eye Space
Input Port Description Type
Vertex Position If set, returns surface depth for the specified vertex position. Useful when applying a vertex offset to shader and need to get the offsetted surface depth. Float3


Back to Node List