Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GetProperty() is an extensible API through which the renderer may query the plugin.  The list of valid queries are enumerated in LightFilterProperty.  If a plugin can answer the query, it fills in result and returns k_RixSCUniform.  Otherwise GetProperty should return k_RixSCInvalidDetail.  The example given shows how the plugin returns the unique string for the linking groups to which the light filter belongs.

...

Code Block
languagecpp
bool PxrMyLightFilter::GetRadianceModifier(
    FilterRadianceModifierProperty property,
    RixLightFilterContext const* lfCtx,
    RtConstPointer instanceData,
    float* result) const
{
    *result = m_attenuation;
    return true;
}

GetRadianceModifierGetRadianceModifier() returns a single float representing how much the filter modulates the light emitted from a light source.  Not all filters attenuate or amplify the light signal; those plugins would return false and not modify result.

...