Get Normal
Get Normal
Provides the surface Normal (or a reasonable equivalent), in world space, of the current Render State. The Render State is affected by any shaders which were called before this function is called, among other things.
Normal is usually the most recently calculated surface normal at the current point on the surface being rendered or sampled, but may be modified by other shaders, e.g. Redirect Shader whose purpose is to change the normal to cause displacement shaders to displace in different directions.
When used in the context of displacement, for example in a function network that feeds a displacement shader, Normal depends on where the node is connected with respect to Compute Terrain and Compute Normal, and may also depend on other displacement shaders. Initially the normal is derived from the undisplaced surface being rendered. On imported objects such as OBJs or TGOs, normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these are initially set to the normal at the point on the flat planet from which the terrain was displaced, but may be updated by Compute Terrain or Compute Normal nodes to provide a more detailed representation of the surface relief.
When used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Normal is always the "final normal" after all displacement and includes micro-polygon details. By the time a shader's colour and lighting is calculated, all displacements for that point have been performed and the renderer has already recalculated the normal for the micro-polygon or surface point.
When sampling an atmosphere shader, Normal is usually set to the local "Up" vector with respect to the planet to which the atmosphere shader is attached.
For some shading uses it may be better to use Get Normal in Texture, because that often provides a value that is consistent between displacement and colour contexts, but Get Normal provides more detail for colour and lighting because it includes all displacements.
The Input connection is not used by this node.
