2008 | OriginalPaper | Buchkapitel
Modifying surface geometry
Erschienen in: Writing mental ray® Shaders
Verlag: Springer Vienna
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
So far, our shaders have only been calculating color values—the type of the result argument has been a pointer to miColor. Many shaders depend upon the shape of a surface to calculate the way in which light determines the resulting color value. By modifying the surface geometry in a shader, we can affect the calculation of that color. In a
displacement shader
, the result is a miScalar that defines how far along the surface normal the current point should be moved. Displacement shaders can provide geometric detail at a scale that would be very difficult to model directly.