Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2008 mental images GmbH, Berlin
About this chapter
Cite this chapter
(2008). Modifying surface geometry. In: Writing mental ray® Shaders. mental ray® Handbooks, vol 3. Springer, Vienna. https://doi.org/10.1007/978-3-211-48965-9_17
Download citation
DOI: https://doi.org/10.1007/978-3-211-48965-9_17
Publisher Name: Springer, Vienna
Print ISBN: 978-3-211-48964-2
Online ISBN: 978-3-211-48965-9
eBook Packages: Computer ScienceComputer Science (R0)