Displacement Shader to Scalar: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
The Displacement shader to scalar node extracts the displacement generated by the connected shader, and returns the dot product (inner product) of that displacement vector and the current normal. Effectively this is the amount of displacement in the direction of the current normal. It may be positive or negative. | The Displacement shader to scalar node extracts the displacement generated by the connected shader, and returns the dot product (inner product) of that displacement vector and the current normal. Effectively this is the amount of displacement in the direction of the current normal. It may be positive or negative. | ||
In general, shaders may displace in any direction, so displacement is a vector. However, most of the time when you want to extract displacement for use in other functions you expect a scalar value. Most shaders displace along the normal, so by returning the dot produce of the normal and the displacement vector, this node produces the displacement value you would typically expect. | |||
'''Node Type:''' Function<br /> | '''Node Type:''' Function<br /> | ||
Revision as of 03:55, 7 December 2013
Node Description and Purpose:
The Displacement shader to scalar node extracts the displacement generated by the connected shader, and returns the dot product (inner product) of that displacement vector and the current normal. Effectively this is the amount of displacement in the direction of the current normal. It may be positive or negative.
In general, shaders may displace in any direction, so displacement is a vector. However, most of the time when you want to extract displacement for use in other functions you expect a scalar value. Most shaders displace along the normal, so by returning the dot produce of the normal and the displacement vector, this node produces the displacement value you would typically expect.
Node Type: Function
Settings:
This node has no other settings apart from the Input node.