...
In certain cases, integrators may also call RixBxdfFactory::BeginOpacity()
to retrieve a RixOpacity
object. BeginOpacity
should be implemented in a similar fashion to BeginScatter()
, except that will be only be invoked by the renderer in narrower constraints: either for presence and opacity. As such, any inputs to the factory that do not affect presence nor opacity need not be evaluated. Furthermore, the RixSCShadingMode
can be examined to further narrow down the inputs; it will take either the value k_RixSCPresenceQuery
or k_RixSCOpacityQuery
.
Anchor | ||||
---|---|---|---|---|
|
Bxdfs that require special opacity handling or support interior shading need to indicate their support for these capabilities via an instance hint. Most Bxdfs do not require such, and should simply implement in their factory a trivial implementation of GetInstanceHints()
which simply returns k_TriviallyOpaque
. Bxdfs that do modulate opacity and/or require interior shading are required to override the GetInstanceHints()
method and return the appropriate bits in InstanceHints
to the renderer in order to trigger calls to BeginOpacity
and BeginInterior
.
...