stdrsl Shaders

stdrsl Shaders

Introduction

The shaders described below are basic shaders, embodying "modern" shading techniques, taking advantage of updates to the shading language that began with the introduction of RSL 2.0 in 13.5 and including advancements in PRMan 16.0 described in the Physically Plausible Shading in RSL application note. The shaders themselves can be found in $RMANTREE/lib/rsl/shaders/. These shaders should not, under any circumstances, be confused with the legacy shaders found in $RMANTREE/lib/shaders.


Material Shaders

plausibleConductor

This shader models an anisotropic conductor material, implementing a basic amount of functionality needed to shade plausible shiny metallic materials, using the stdrsl SpecularAS.h component.

plausibleDielectric

The plausibleDielectric shader implements a basic amount of functionality needed to produce plausible dielectric materials via the SpecularAS.h specular component with a simple Lambertian diffuse term, weighted by the transmission coefficient.

plausibleGlass

The plausibleGlass shader uses the stdrsl SpecularAS.h specular component and the generateSamples and evaluateSamples methods, providing a basic amount of functionality to shade plausible glass materials.

plausibleBasicHair

The plausibleBasicHair shader uses Hair.h to provide a simple example of a plausible hair material.

plausibleMatte

Using several stdrsl components - ShadingContext.h, RadianceSample.h, and Lambert.h- the plausibleMatte shader provides a basic amount of functionality to shade matte materials.

plausibleSubSurface

plausibleSubSurface implements a basic amount of functionality needed to shade materials with subsurface scattering and specular reflection. See the shader source for tips on usage.


Light Shaders

plausibleArealight

A simple area light, this shader includes the AreaSampler.h header file and invokes the generateSamples, evaluateSamples, and shadowSamples methods.

plausibleEnvlight

A simple environment light, this shader includes the RadianceSample.h file and invokes the generateSamples, evaluateSamples, and shadowSamples methods.

plausibleSunlight

A simple directional/distant light, this shader includes RadianceSample.h and, once again, invokes the generateSamples, evaluateSamples, and shadowSamples methods.


Volume Shaders

plausibleVolume

A simple volume shader, it includes ShadingContext.h, RadianceSample.h, SampleMgr.h, IsotropicVolume.h, and Colors.h, and implements a basic amount of functionality for shading plausible volumes, using a simple isotropic scattering diffuse term.


Hello Shaders

There are also several simpler shaders, provided as examples, that may not be quite as plausibly useful:

  • helloAS.sl

    The "hello world" of area light-aware shaders, using the stdrsl specular component (SpecularAS.h) with a simple Lambertian diffuse term.

  • helloDBRDF.sl

    Similar to the helloAS shader, but using SpecularDBRDF.h for the specular component.

  • helloMicrofacet.sl

    This shader is a simple example of how one might use the SpecularMicrofacet.h BSDF component. It makes use of several other stdrsl components, as well.

  • helloPlastic.sl

    Another "hello world"-type example of area light-aware shaders, in this case using the RadianceSample.h component for a basic plastic material.