Page tree

Versions Compared

Key

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

...

Light filters are bound to lights like bxdfs are bound to geometry: they obey attribute scoping and the last one specified wins.

Code Block
languagetext
LightFilter "PxrGobo" "gobo1"  "string coordSys" ["Gobo1"] "string map" ["ratGrid.tx"]
Light "PxrPrectLight" "light1"

...


Will turn on all light filters in group "blockers" for all lights shining on the sphere.  By convention, all of the filters shipped with RenderMan use "linkingGroups" as the name of the parameter.   Both the "linkingGroups" and "lightfilter:subset" strings may be comma-separated lists of group names.  Group name matching is not scoped to a light.  Any filter in a matching group on any light active on a given geometric primitive will be enabled.

Light filter methods

Light filters implement the RixLightFilter interface found in RixLightFilter.h.  A light filter must implement three methods:

Filter()

A light filter plugin implements the following method:Filter is where the work is done.

Code Block
languagecpp
virtual void Filter(
	RixLightFilterContext const *lfCtx,
    RtConstPointer instanceData,
    RtInt const numSamples,
    RtInt const * shadingCtxIndex,
    RtVector3 const * toLight,
    RtFloat const * dist,
    RtFloat const * lightPdfIllum,
    RixBXLobeWeights *contribution);

...