Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The surface positions and normals are in "current" space.  Usually it is convenient to transform them to object space, which is convenient since it means that the displacements scale and rotate along with the object.  (In actuality, "current" space in displacement shaders is object space and the transform turns into an identity, but it is good form to generalize and future-proof any displacement shader you write and do the transformation to object space anyway.)  In the rare cases where displacements in world space are preferred, the amplitude simply needs to be scaled by the length of the normal transformed to world space.  (If the master object is instantiated to more than one instanced object, then the world transform of the first instance is used.)

...