RenderMan API  23.0
RixBxdf.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 1986-2019 Pixar. All rights reserved.
5 #
6 # The information in this file (the "Software") is provided for the exclusive
7 # use of the software licensees of Pixar ("Licensees"). Licensees have the
8 # right to incorporate the Software into other products for use by other
9 # authorized software licensees of Pixar, without fee. Except as expressly
10 # permitted herein, the Software may not be disclosed to third parties, copied
11 # or duplicated in any form, in whole or in part, without the prior written
12 # permission of Pixar.
13 #
14 # The copyright notices in the Software and this entire statement, including the
15 # above license grant, this restriction and the following disclaimer, must be
16 # included in all copies of the Software, in whole or in part, and all permitted
17 # derivative works of the Software, unless such copies or derivative works are
18 # solely in the form of machine-executable object code generated by a source
19 # language processor.
20 #
21 # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23 # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27 # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28 # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29 #
30 # Pixar
31 # 1200 Park Ave
32 # Emeryville CA 94608
33 #
34 # ------------------------------------------------------------------------------
35 */
36 
37 #ifndef RixBxdf_h
38 #define RixBxdf_h
39 
40 #include <cstddef> // for NULL
41 #include <vector> // for vector
42 #include "RixBxdfLobe.h" // for RixBXLobeTraits, etc
43 #include "RixShading.h" // for RixSCShadingMode, etc
44 #include "prmanapi.h" // for PRMANEXPORT, PRMAN_INLINE
45 #include "ri.h" // for RtColorRGB, RtConstPointer, etc
46 
47 class RixBxdf;
50 class RixOpacity;
51 class RixRNG;
53 class RixPostLighting;
54 struct RtRayGeometry;
55 
113 // RixBXEvaluateDomain tells Integrator the domain over which
114 // lighting/connecting/merging needs to be done.
115 // Reflect/Front = light samples are from the side the ray came from
116 // Transmit/Back = light samples are opposite the side the ray came from
117 // Outside = light samples are from the side the surface normal points into
118 // Inside = light samples are from the side the surface normal points away from
119 // The difference between Both and Volume is whether there's a cosine
120 // term (for surfaces) or not (for volumes).
122 {
123  // clang-format off
124  k_RixBXEmptyDomain = 0, // black hole (possibly emissive)
125 
126  // Elementary subdomains
127  // V = view , L = light/connect/merge, N = normal, ------ = surface
128  k_RixBXOutsideReflect = 1, // V\ N /L
129  //----------
130  //
131 
133  //----------
134  // V/
135 
137  //----------
138  // V/ \L
139 
141  //----------
142  // \L
143 
144  // Common domains
147  // for reference to v19/20 shaders, these are equivalent
148  // k_RixBXFront = k_RixBXReflect,
149  // k_RixBXBack = k_RixBXTransmit,
153 
154  k_RixBXVolume = 16 // light from all directions
155  // clang-format on
156 };
157 
159  RtVector3 const& N, RtVector3 const& V)
160 {
161  // we've been told to sample everything, so don't reject
162  if (domain & k_RixBXVolume || domain == k_RixBXBoth) return true;
163  if (domain == k_RixBXEmptyDomain) return false;
164 #if 0
165  // reference implementation
166  float dpL = L.Dot(N);
167  float dpV = N.Dot(V);
168 
169  switch(domain){
170  case k_RixBXOutsideTransmit: // 2
171  return (dpL > 0.0f && dpV < 0.0f);
172  break;
173  case k_RixBXOutsideReflect: // 1
174  return (dpL > 0.0f && dpV > 0.0f);
175  break;
176  case k_RixBXInsideTransmit: // 8
177  return (dpL < 0.0f && dpV > 0.0f);
178  break;
179  case k_RixBXInsideReflect: // 4
180  return (dpL < 0.0f && dpV < 0.0f);
181  break;
182  case k_RixBXInside: // 12
183  return (dpL < 0.0f);
184  break;
185  case k_RixBXOutside: // 3
186  return (dpL > 0.0f);
187  break;
188  case k_RixBXReflect: // 5
189  return ((dpL > 0.0f) != (dpV < 0.0f));
190  break;
191  case k_RixBXTransmit: // 10
192  return ((dpL > 0.0f) == (dpV < 0.0f));
193  break;
194  case k_RixBXOutsideTransmit | k_RixBXInsideReflect: // 2 | 4 = 6
195  return ((dpL > 0.0f && dpV < 0.0f) || (dpL < 0.0f && dpV < 0.0f));
196  break;
197  case k_RixBXOutsideReflect | k_RixBXInsideTransmit: // 1 | 8 = 9
198  return ((dpL > 0.0f && dpV > 0.0f) || (dpL < 0.0f && dpV > 0.0f));
199  break;
201  return ((dpL > 0.0f && dpV < 0.0f) || (dpL > 0.0f && dpV > 0.0f) ||
202  (dpL < 0.0f && dpV < 0.0f));
203  break;
205  return ((dpL > 0.0f && dpV > 0.0f) || (dpL < 0.0f && dpV > 0.0f) ||
206  (dpL < 0.0f && dpV < 0.0f));
207  break;
209  return ((dpL > 0.0f && dpV < 0.0f) || (dpL < 0.0f && dpV > 0.0f) ||
210  (dpL < 0.0f && dpV < 0.0f));
211  break;
213  return ((dpL > 0.0f && dpV > 0.0f) || (dpL > 0.0f && dpV < 0.0f) ||
214  (dpL < 0.0f && dpV > 0.0f));
215  break;
216  default:
217  return false;
218  }
219 #else
220  float dpL = L.Dot(N);
221  if (domain == k_RixBXInside || domain == k_RixBXOutside)
222  {
223  // We can avoid the dot product with V in these two cases
224  if (domain == k_RixBXOutside) return (dpL > 0.0f);
225  if (domain == k_RixBXInside) return (dpL < 0.0f);
226  }
227  else
228  {
229  float dpV = N.Dot(V);
230  bool valid = false;
231  // clang-format off
232  valid = valid ||
233  ((domain & k_RixBXOutsideTransmit) && (dpL > 0.0f && dpV < 0.0f));
234  valid = valid ||
235  ((domain & k_RixBXOutsideReflect) && (dpL > 0.0f && dpV > 0.0f));
236  valid = valid ||
237  ((domain & k_RixBXInsideTransmit) && (dpL < 0.0f && dpV > 0.0f));
238  valid = valid ||
239  ((domain & k_RixBXInsideReflect) && (dpL < 0.0f && dpV < 0.0f));
240  return valid;
241  // clang-format on
242  }
243 #endif
244  return true;
245 }
246 
247 // RixBXTransportTrait tells Bxdf the subset of light transport to consider.
249 {
250  k_RixBXDirectLighting = 1 << 0, // (direct lighting samples only)
251  k_RixBXIndirectLighting = 1 << 1, // (indirect lighting samples only)
253 };
254 
255 // Tells whether ray end points lies in volume or on boundary(interface)
257 {
262 };
263 
265 {
266 public:
267  virtual int GetInterface() const override
268  {
269  return k_RixBxdfFactory;
270  }
271 
299  {
300  // clang-format off
302 
303  // returns RixOpacity for opacity
305  // do not set unless k_ComputesOpacity is set
307 
308  // returns RixOpacity for presence
310  // do not set unless k_ComputesPresence is set
312 
314 
315  // has interior integration requirements
317  // supports transmission
319  // requires volume, not surface, primvars
321  // supports overlapping of interiors
323  //
325  // subsurface interior integration
327 
328  // computes opacity for camera/indirect rays too
330 
331  // blocks volumes. Will only have an effect if
332  // kComputesInterior is also not set.
334 
335  // returns RixPostLighting
337 
338  // clang-format on
339  };
340 
341  virtual int GetInstanceHints(RtPointer instanceData) const = 0;
342 
343  virtual void RegisterTemporalVolumeParams(RtPointer instanceData,
344  std::vector<int>& paramId) const = 0;
345 
368  virtual RixBxdf* BeginScatter(RixShadingContext const*, RixBXLobeTraits const& hints,
369  RixSCShadingMode, RtPointer instanceData) = 0;
370 
371  // usually called by RixBxdf::Release()
372  virtual void EndScatter(class RixBxdf* bxdf) = 0;
373 
402  RtPointer instanceData) = 0;
403 
404  virtual void EndOpacity(class RixOpacity*) = 0;
405 
434  RtPointer instanceData) = 0;
435 
436  virtual void EndInterior(RixVolumeIntegrator*) = 0;
437 
465  RtPointer instanceData) = 0;
466 
467  virtual void EndSubsurface(RixVolumeIntegrator*) = 0;
468 
471  virtual float GetIndexOfRefraction(RtPointer instanceData) const = 0;
472 
475  {
476  PIXAR_ARGUSED(instanceData);
477 
478  return NULL;
479  }
480 
481  virtual void EndPostLighting(class RixPostLighting*)
482  {}
483 
484 protected:
486  {}
487  virtual ~RixBxdfFactory()
488  {}
489 };
490 
491 // RixBxdf holds all state computed by BeginScatter, including
492 // the RixShadingContext.
493 class RixBxdf
494 {
495 public:
496  RixBxdf(RixShadingContext const* sCtx, RixBxdfFactory* factory)
497  : shadingCtx(sCtx), bxdfFactory(factory)
498  {}
499 
500  virtual ~RixBxdf()
501  {}
502 
504  {
505  return shadingCtx;
506  }
508  {
509  return bxdfFactory;
510  }
511 
512  // The domain over which this Bxdf evaluates samples. Note
513  // that it may Generate discrete samples in any direction, this only
514  // tells where incoming samples could Evaluate to non-zero.
515  virtual RixBXEvaluateDomain GetEvaluateDomain() = 0;
516 
517  // The types of samples this BxdfEvaluator can generate.
518  virtual void GetAggregateLobeTraits(RixBXLobeTraits* t) = 0;
519 
521  {
522  RixBXLobeTraits t;
523  this->GetAggregateLobeTraits(&t);
524  return t;
525  }
526 
527  // Bxdfs can be queried for general material properties to
528  // facilitate integration tasks. Bxdfs should return
529  // k_RixSCInvalidDetail if a particular property is unsupported.
530  // If a property is supported Bxdf should return k_RixSCUniform or
531  // k_RixSCVarying according to the detail of the result. A trivial
532  // implementation that supports no properties of any sort should
533  // simply return k_RixSCInvalidDetail.
535  {
536  k_Albedo, // RtColorRGB
537  k_MaterialIor // float
538  };
539  virtual RixSCDetail GetProperty(BxdfProperty, void const** result) const = 0;
540 
541  // EmitLocal: used for baked, pre-integrated, indirect results. A
542  // trivial implementation with no local emission should simply
543  // return false, indicating to the integrator that 'result' is
544  // untouched and that the integrator should not do anything with
545  // the results. For bxdfs that do have local emission, they should
546  // return true and write shadingCtx->numPts colors to the 'result'
547  // array. The integrator will then include the returned colors in
548  // the direct lighting for the geometry.
549  virtual bool EmitLocal(RtColorRGB* result) = 0;
550 
584  virtual void GenerateSample(RixBXTransportTrait transportTrait,
585  RixBXLobeTraits const* lobesWanted, RixRNG* rng,
587  RixBXLobeSampled* lobesSampled, RtVector3* directions,
588  RixBXLobeWeights& weights, float* forwardPdfs, float* reversePdfs,
589  RtColorRGB* compTrans = NULL) = 0;
590 
614  virtual void EvaluateSample(RixBXTransportTrait transportTrait,
615  RixBXLobeTraits const* lobesWanted, RixRNG* rng,
616  RixBXLobeTraits* lobesEvaluated,
617  RtVector3 const* directions,
619  RixBXLobeWeights& weights, float* forwardPdfs,
620  float* reversePdfs) = 0;
621 
622  // EvaluateSamplesAtIndex:
623  // Do multiple evals at a single shading point. Also see the documentation
624  // above for EvaluateSample().
625  virtual void EvaluateSamplesAtIndex(RixBXTransportTrait transportTrait,
626  RixBXLobeTraits const& lobesWanted, RixRNG* rng, int index,
627  int numSamples,
629  RixBXLobeTraits* lobesEvaluated,
630  RtVector3 const* directions, RixBXLobeWeights& weights,
631  float* forwardPdfs, float* reversePdfs) = 0;
632 
633  // Release does any cleanup that might be needed (often none and the
634  // base implementation is fine) and then calls the base implementation.
635  // A RixBxdf that contains another RixBxdf would need to call Release
636  // on its child as part of its own Release.
637  virtual void Release()
638  {
639  if (bxdfFactory) bxdfFactory->EndScatter(this);
640  }
641 
642 protected:
645 };
646 
647 // RixOpacity objects are obtained from the BxdfFactory::BeginOpacity
648 // when it determines conditions warrant non-trivial responses to
649 // either or both of Presence and Opacity queries. GetPresence
650 // is invoked when an object isn't trivially 'present' and may
651 // be used for radiance queries to infer "ray continuation". It is
652 // useful to express cutouts as, for example, a leaf shape modeled
653 // with a texture map. Most objects are trivially present and the
654 // BxdfFactory should respond to NULL RixOpacity when the
655 // RixSCShadingMode is k_RixSCPresenceQuery. In the case of
656 // an opaque leaf, BxdfFactory should instantiate a RixOpacity
657 // subclass to respond to GetPresence requests and the
658 // "presence closure" should be constructed with the minimum
659 // state required to respond to this request. If our example
660 // leaf is opaque for shadowing, the BxdfFactory should respond
661 // to BeginOpacity requests with NULL for k_RixSCTransmissionQuery.
662 // But if the shadow of the leaf wants leaf coloration, BxdfFactory
663 // should produce a RixOpacity subclass that combines the effects
664 // of presence and coloration into a single opacity value. Since
665 // opacity can be colored, keep in mind that it is the inverse of
666 // transparency and user interfaces usually prefer to present
667 // a transparency color to the user.
668 //
670 {
671 public:
673  : shadingCtx(sCtx), bxdfFactory(factory)
674  {}
675  virtual ~RixOpacity()
676  {}
678  {
679  return bxdfFactory;
680  }
682  {
683  return shadingCtx;
684  }
685 
697  virtual bool GetPresence(float* result) = 0;
698 
709  virtual bool GetOpacity(RtColorRGB* result) = 0;
710 
711  virtual void Release()
712  {
713  if (bxdfFactory) bxdfFactory->EndOpacity(this);
714  }
715 
716 protected:
719 };
720 
721 // RixVolumeIntegrators can be obtained from the BxdfFactory at
722 // the hit point where a ray enters an interior region.
723 // A VolumeIntegrator can be seen as a delegate for the real
724 // IntegratorCtx that implements special behavior behind the
725 // GetNearestHits and GetTransmission methods. The idea is
726 // that the integration complexity in a volume region can be
727 // hidden from the outside world by reducing more complex
728 // light-paths into a single measurement of energy thruput,
729 // transmission, coupled with potentially distinct shading
730 // contexts to capture light transfer into the volume region.
731 // VolumeIntegrators can either be built-in or compiled-in to
732 // a bxdf. In the former case, a reference to an instance of
733 // a VolumeIntegrator should be obtained from the RixShadingContext.
734 // To support pre-constructed builtin VolumeIntegrators we offer
735 // a generic method to pass instance parameters to the integrator.
736 // Typically builtin VolumeIntegrators define a struct comprised of
737 // the parameters it requires from the enclosing bxdf factory.
738 // The memory for (and evaluation of) the parameters is the responsibility
739 // of the enclosing bxdf. This extra dance is required to diminish
740 // the likelihood of disruption caused by the addition of new parameters
741 // by plugin/builtin volume integrators. In the direct-linked case
742 // clients can bypass the SetParameters convenience routines in
743 // favor of direct constructor.
745 {
746 public:
748  : bxdfFactory(f),
749  instanceData(_instanceData),
750  params(NULL),
751  surfaceCtx(sCtx),
752  volumeCtx(NULL)
753  {}
755  {}
756 
757  // Interfaces to obtain the shading context is slightly different for
758  // volume integrators compared with bxdfs. There are two contexts for
759  // shading contexts; one representing the volume "surface" (the interface
760  // for the volume) and one for the volume interior. The surface context
761  // can be obtained by using GetShadingCtx. The returned context can never
762  // be NULL. To obtain a shading context for volume interiors, use
763  // GetVolumeShadingCtx.
765  {
766  return surfaceCtx;
767  }
768 
770  {
771  return volumeCtx;
772  }
773 
775  {
776  return bxdfFactory;
777  }
778 
780  {
781  return instanceData;
782  }
783 
784  virtual void SetParameters(void const* subclassParams)
785  {
786  params = subclassParams;
787  }
788 
790  {
791  public:
792  virtual void PerformDirectLighting(RixShadingContext const&,
793  RixBXLobeTraits const* lobesWanted, int step) = 0;
794 
795  protected:
797  {}
798  };
799 
800  virtual void Release()
801  {
802  if (bxdfFactory) bxdfFactory->EndInterior(this);
803  }
804 
805  // Volumes can be queried for general material properties to
806  // facilitate integration tasks. Volumes should return
807  // k_RixSCInvalidDetail if a particular property is unsupported.
808  // If a property is supported the volume should return
809  // k_RixSCUniform or k_RixSCVarying according to the detail of the
810  // result.
812  {
813  k_DensityType, // int - value should be one of
814  // k_DensityFloat/k_DensityColor
815  k_DensityFloat, // float
816  k_DensityColor, // RtColorRGB
817  k_MaxDensity, // float
818  k_Velocity, // RtFloat3
821  k_DensityFloatId, // param id for float density
822  k_DensityColorId, // param id for color density
823  k_Emission, // RtColorRGB
824  };
825  virtual RixSCDetail GetProperty(VolumeProperty, void const** /* result */) const
826  {
827  // Note: currently we offer a default implementation. We may
828  // choose to enforce implementing this in the future so we
829  // encourage you to implement this method.
830  return k_RixSCInvalidDetail;
831  }
832 
833  // Begin/EndVolumeSampling: can be called by a volume integrator
834  // to obtain a mutable shading context for the purposes of
835  // sampling its volume region. The resulting shading context
836  // has the same size as its creator context. Two options
837  // for cleanup are offered. If the volume integrator wishes
838  // to expose/publicize a new shading context to the primary
839  // integrator, it should set exposeVol to a non-NULL
840  // RixBXLobeTraits pointer (which usually points to the same
841  // RixBXLobeTraits passed to the interior's GetNearestHits
842  // method). The optional membership array can be used to
843  // communicate the subset of points on the current shading
844  // context that should be conveyed to the new one. A non-zero
845  // value signals the membership request in a new context. If
846  // NULL, all points will be used to construct a new shading
847  // context. In this usage, the return result will be a distinct
848  // shading context appropriate for use by the primary
849  // integrator. If exposeVol is NULL, the the result is NULL and
850  // internal volume sampling state is released.
852  {
853  const RixShadingContext* sCtx = GetShadingCtx();
854  RixShadingContext* newCtx = sCtx->BeginVolumeSampling();
855  volumeCtx = newCtx;
856  return volumeCtx;
857  }
858 
859  RixShadingContext const* EndVolumeSampling(RixBXLobeTraits const* exposeVol = NULL,
860  int const* membership = NULL)
861  {
862  const RixShadingContext* sCtx = GetShadingCtx();
863  const RixShadingContext* newCtx = sCtx->EndVolumeSampling(volumeCtx, exposeVol, membership);
864  volumeCtx = NULL;
865 
866  return newCtx;
867  }
868 
869  virtual void GetNearestHits(int numRays, RtRayGeometry const* rays, RixRNG* rng,
870  RixBXLobeTraits const& lobesWanted, RixIntegratorContext& iCtx,
871  RixLightingServices* lightingServices,
872  // results: (per-ray transmission deposited
873  // on resulting ShadingContexts'
874  // transmission field). Inscattered
875  // radiance can be splatted directly to
876  // the screen.
877  IntegratorDelegate* lcb, int* numShadingCtxs,
878  RixShadingContext const** shadingCtxs,
879  // optional inputs:
880  RtUString const subset = US_NULL,
881  RtUString const excludeSubset = US_NULL, bool isLightPath = false,
882  RtHitSides hitSides = k_SidesBoth, bool isPrimary = false) = 0;
883 
884  // We provide a default implementation of GetTransmission because
885  // some volume integrators may be opaque to transmission rays.
886  // This occurs when the only supported light transport mode is indirect.
887  // In this case, the volume integrator's associated bxdffactory may
888  // select to return a NULL volume integrator for transmission queries.
889  virtual void GetTransmission(int numRays, RtRayGeometry const* rays, RixRNG* rng,
890  RixIntegratorContext& iCtx, RtColorRGB* transmissions,
891  // optional output
892  RtColorRGB* emission,
893  // optional input;
894  RtUString const subset = US_NULL,
895  RtUString const excludeSubset = US_NULL)
896  {
897  PIXAR_ARGUSED(rays);
898  PIXAR_ARGUSED(rng);
899  PIXAR_ARGUSED(iCtx);
900  PIXAR_ARGUSED(emission);
901  PIXAR_ARGUSED(subset);
902  PIXAR_ARGUSED(excludeSubset);
903  for (int i = 0; i < numRays; ++i)
904  {
905  transmissions[i] = RtColorRGB(0.0f);
906  }
907  }
908 
909 protected:
912  void const* params;
913 
914 private:
915  RixShadingContext const* surfaceCtx;
916  RixShadingContext* volumeCtx;
917 };
918 
920 {
921 public:
923  : shadingCtx(sCtx), bxdfFactory(factory)
924  {}
925 
927  {}
928 
929  // Release does any cleanup that might be needed (often none and the
930  // base implementation is fine) and then calls the base implementation.
931  virtual void Release()
932  {
933  if (bxdfFactory) bxdfFactory->EndPostLighting(this);
934  }
935 
936  virtual void Filter(int const numLightSamples, RtVector3 const* directions,
937  float const* distances, RixBXLobeWeights* bxdfWeights,
938  RixBXLobeWeights* lightWeights, RtColorRGB* transmissions) = 0;
939 
940 protected:
943 };
944 
945 // clang-format off
946 #define RIX_BXDFPLUGINCREATE \
947  extern "C" PRMANEXPORT RixBxdfFactory* CreateRixBxdfFactory(const char* hint)
948 
949 #define RIX_BXDFPLUGINDESTROY \
950  extern "C" PRMANEXPORT void DestroyRixBxdfFactory(RixBxdfFactory* bxdf)
951 // clang-format on
952 
953 #endif
virtual float GetIndexOfRefraction(RtPointer instanceData) const =0
virtual void EndSubsurface(RixVolumeIntegrator *)=0
RixPostLighting(RixShadingContext const *sCtx, RixBxdfFactory *factory)
Definition: RixBxdf.h:922
RtHitSides
Definition: RixShading.h:99
pxrcore::ColorRGB RtColorRGB
#define US_NULL
virtual RixPostLighting * BeginPostLighting(RixShadingContext const *, RixSCShadingMode, RtPointer instanceData)
Definition: RixBxdf.h:473
RixShadingContext const * shadingCtx
Definition: RixBxdf.h:717
virtual ~RixPostLighting()
Definition: RixBxdf.h:926
RixShadingContext * BeginVolumeSampling()
Definition: RixBxdf.h:851
BxdfProperty
Definition: RixBxdf.h:534
RixShadingContext const * EndVolumeSampling(RixBXLobeTraits const *exposeVol=NULL, int const *membership=NULL)
Definition: RixBxdf.h:859
void * RtPointer
Definition: ri.h:69
RixBXRayFlags
Definition: RixBxdf.h:256
This struct represents the characteristics of just one lobe of a bxdf.
Definition: RixBxdfLobe.h:64
RixBxdfFactory * bxdfFactory
Definition: RixBxdf.h:910
RixBXTransportTrait
Definition: RixBxdf.h:248
virtual RixOpacity * BeginOpacity(RixShadingContext const *, RixSCShadingMode, RtPointer instanceData)=0
RixBxdfFactory * GetBxdfFactory()
Definition: RixBxdf.h:507
RixSCShadingMode
Definition: RixShading.h:497
RtPointer GetInstanceData() const
Definition: RixBxdf.h:779
RixShadingContext * GetVolumeShadingCtx() const
Definition: RixBxdf.h:769
RixBxdfFactory * GetBxdfFactory()
Definition: RixBxdf.h:677
virtual void Release()
Definition: RixBxdf.h:711
RixSCDetail
Definition: RixShading.h:376
virtual void EndInterior(RixVolumeIntegrator *)=0
RixBxdf(RixShadingContext const *sCtx, RixBxdfFactory *factory)
Definition: RixBxdf.h:496
virtual ~RixOpacity()
Definition: RixBxdf.h:675
virtual void EndPostLighting(class RixPostLighting *)
Definition: RixBxdf.h:481
virtual void Release()
Definition: RixBxdf.h:931
virtual void EndScatter(class RixBxdf *bxdf)=0
RixOpacity(RixShadingContext const *sCtx, RixBxdfFactory *factory)
Definition: RixBxdf.h:672
RixShadingContext const * GetShadingCtx() const
Definition: RixBxdf.h:764
virtual int GetInstanceHints(RtPointer instanceData) const =0
virtual class RixVolumeIntegrator * BeginSubsurface(RixShadingContext const *, RixSCShadingMode, RtPointer instanceData)=0
virtual void Release()
Definition: RixBxdf.h:800
RixShadingContext const * GetShadingCtx()
Definition: RixBxdf.h:503
virtual void Release()
Definition: RixBxdf.h:637
virtual void GetTransmission(int numRays, RtRayGeometry const *rays, RixRNG *rng, RixIntegratorContext &iCtx, RtColorRGB *transmissions, RtColorRGB *emission, RtUString const subset=US_NULL, RtUString const excludeSubset=US_NULL)
Definition: RixBxdf.h:889
virtual ~RixBxdf()
Definition: RixBxdf.h:500
RixShadingContext const * shadingCtx
Definition: RixBxdf.h:941
RtPointer instanceData
Definition: RixBxdf.h:911
void const * params
Definition: RixBxdf.h:912
virtual class RixVolumeIntegrator * BeginInterior(RixShadingContext const *, RixSCShadingMode, RtPointer instanceData)=0
pxrcore::UString RtUString
virtual RixShadingContext * BeginVolumeSampling() const =0
RixBxdfFactory * bxdfFactory
Definition: RixBxdf.h:942
#define PRMAN_INLINE
Definition: prmanapi.h:86
#define k_RixShadingVersion
Definition: RixShading.h:97
virtual void EndOpacity(class RixOpacity *)=0
virtual ~RixVolumeIntegrator()
Definition: RixBxdf.h:754
virtual void SetParameters(void const *subclassParams)
Definition: RixBxdf.h:784
Definition: RixRNG.h:59
RixBXEvaluateDomain
Definition: RixBxdf.h:121
virtual RixSCDetail GetProperty(VolumeProperty, void const **) const
Definition: RixBxdf.h:825
RixBxdfFactory * bxdfFactory
Definition: RixBxdf.h:718
virtual RixShadingContext const * EndVolumeSampling(const RixShadingContext *, RixBXLobeTraits const *exposeVol=NULL, int const *membership=NULL) const =0
PRMAN_INLINE bool RixVisibleToDomain(RixBXEvaluateDomain domain, RtVector3 const &L, RtVector3 const &N, RtVector3 const &V)
Definition: RixBxdf.h:158
virtual void RegisterTemporalVolumeParams(RtPointer instanceData, std::vector< int > &paramId) const =0
RixBxdfFactory * bxdfFactory
Definition: RixBxdf.h:644
PRMAN_INLINE RixBXLobeTraits GetAllLobeTraits()
Definition: RixBxdf.h:520
virtual int GetInterface() const override
Definition: RixBxdf.h:267
virtual ~RixBxdfFactory()
Definition: RixBxdf.h:487
RixShadingContext const * GetShadingCtx()
Definition: RixBxdf.h:681
Definition: RixBxdf.h:919
RixBxdfFactory * GetBxdfFactory() const
Definition: RixBxdf.h:774
RixShadingContext const * shadingCtx
Definition: RixBxdf.h:643
RixVolumeIntegrator(RixShadingContext const *sCtx, RixBxdfFactory *f, RtPointer _instanceData)
Definition: RixBxdf.h:747
virtual RixBxdf * BeginScatter(RixShadingContext const *, RixBXLobeTraits const &hints, RixSCShadingMode, RtPointer instanceData)=0
#define PIXAR_ARGUSED(x)
Definition: prmanapi.h:171
RtFloat3 RtVector3
Definition: RiTypesHelper.h:71