mental ray Architectural and Design Visualization Shader Library
mental ray Architectural and Design Visualization Shader Library
mental ray Architectural and Design Visualization Shader Library
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
104 5 General Utility <strong>Shader</strong>sdeclare shader vector "mia_roundcorners" (scalar "radius",boolean "allow_different_materials",shader "bump",integer "bump_mode",vector "bump_vector",)version 3apply textureend declareThe radius parameter defines the radius of the rounding effect, in world space units.When allow different materials is off, the rounding effect happens only against faces withthe same material. If it is on the rounding effect happens against any face of any material.The bump parameter is a passthrough to any other bump shader that h<strong>and</strong>les additionalbumping of the surface, for example mib bump map2 or similar. This parameter is onlyused if bump mode is 0.To better support OEM integration, the new parameters bump mode <strong>and</strong> bump vectorwas introduced.bump mode defines the coordinate space of the bump vector, as well as that of the returnvalue of the shader itself (which is also a vector), <strong>and</strong> if it is interpreted as a “normal vectorperturbation” or a whole new “normal vector”‘.The following values are legal:• 0: compatible mode. The old bump parameter is used in place of bump vector. Thereturn value is 0,0,0, <strong>and</strong> the shader actually perturbs the normal vector itself.• 1: “add” mode in “internal” space• 2: “add” mode in world space• 3: “add” mode in object space• 4: “add” mode in camera space• 5: “set” mode in “internal” space• 6: “set” mode in world space• 7: “set” mode in object space• 8: “set” mode in camera spaceThe “add” modes mean that the vector contains a normal perturbation, i.e. a modificationthat is “added” to the current normal. The “set” mode means that the actual normal is