RenderManAPI  24.0
RixLPE.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 2020 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 RixLPE_h
38 #define RixLPE_h
39 
40 #include <map> // for map
41 #include <vector> // for vector
42 #include "RixBxdfLobe.h"
43 #include "RixIntegrator.h" // for RixChannelId, etc
44 #include "RixInterfaces.h" // for RixLPEToken, etc
45 #include "RixShadingUtils.h" // for k_ZeroRGB
46 #include "prmanapi.h" // for PRMAN_INLINE
47 #include "RiTypesHelper.h" // for RtColorRGB
48 
49 class RixLPEAutomata;
50 class RixLPEState;
52 
53 typedef std::vector<RixChannelId> ChanIdVec;
54 
55 /* RixLPE interface -- Rix Light Path Expression (LPE) interface
56  *
57  * Use this interface to help support light path expression AOV display
58  * channels in RIS integrators.
59  *
60  * RIS usage:
61  *
62  * See the source code for PxrDirectLighting and PxrPathTracer for
63  * example code that uses the RixLPE interface in order to support light
64  * path expression AOV display channels, and/or follow the example code
65  * below.
66  *
67  * First, use RixIntegratorContext::GetRixLPE() to obtain a RixLPE instance:
68  *
69  * RixLPE *rixLPE = integratorCtx->GetRixLPE();
70  *
71  * Then allocate RixLPEState instances (typically one per light path):
72  *
73  * RixLPEState *states = rixLPE->AllocateStates(maxShadingCtxSize);
74  *
75  * Next, at each scattering event along the light path, call MoveXXX() on
76  * the RixLPEState instance corresponding to that light path in order to
77  * perform state transitions in the LPE deterministic finite automata for
78  * each scattering event.
79  *
80  * states[sCtxIndex].MoveCamera(sCtx, sCtxIndex);
81  * states[sCtxIndex].MoveVertex(sCtx, sCtxIndex, scatterEvent1); // primary hit
82  * states[sCtxIndex].MoveVertex(sCtx, sCtxIndex, scatterEvent2); // secondary hit
83  *
84  * Finally, use the RixLPE::SplatHelper class to aid with writing results to
85  * the LPE AOV display channels:
86  *
87  * RixLPE::SplatHelper aovs(...);
88  * aovs.SplatPerLobe(lobeWeights, weightIndex, thruput, isFinite, clamp, isHoldout);
89  *
90  * Note that SplatHelper::SplatPerLobe() is a utility routine that performs
91  * the final direct lighting (or emissive object) light path transitions and
92  * will accumulate the per-lobe contributions into the beauty and LPE AOVs.
93  * (See the implementation of SplatPerLobe() in RixLPEInline.h for details.)
94  *
95  * Alternatively, some integrators may wish to manually perform the final
96  * state transitions that reach a light or emissive object, and then make
97  * separate per-lobe invocations of the SplatHelper::SplatValue() method to
98  * accumulate contributions for each lobe. E.g.,:
99  *
100  * states[sCtxIndex].MoveVertex(sCtx, sCtxIndex, scatterEvent3);
101  * states[sCtxIndex].MoveLight(sCtx, sCtxIndex, ...);
102  * RixLPE::SplatHelper aovs(...);
103  * aovs.SplatValue(lobe1Contribution, isFinite, clamp);
104  * aovs.SplatValue(lobe2Contribution, isFinite, clamp);
105  *
106  * For emissive objects, the SplatHelper::SplatEmission() method is used to
107  * record the illumination scattering event information:
108  *
109  * aovs.SplatEmission(emission, thruput, isFinite, clamp, isHoldout);
110  *
111  * When the integrator is finished with the RixLPEState instances, then
112  * use RixLPE::FreeStates() to free the memory of the RixLPEState instances:
113  *
114  * rixLPE->FreeStates(maxShadingCtxSize, states);
115  *
116  * Use the RixLPE::AnyLPEs() method to determine whether there are any
117  * light path expression (LPE) AOV display channels at all.
118  *
119  * Use the RixLPE::AnyCustomLPEs() method to determine whether there are any
120  * custom (non-display channel) light path expressions (LPEs) at all.
121  *
122  * Use RixLPE::LgtGrpIdToToken() to convert a lightGroupId into a RixLPEToken
123  * that can be passed into RixLPEState::MoveLight().
124  *
125  */
126 
127 class RixLPE : public RixInterface
128 {
129 public:
130  // The built-in LPE tokens.
132  {
133  k_NULL = 0,
173  };
174 
175  // Flags that control various aspects of what is written to the framebuffer
176  // for LPE AOVs.
178  {
186  };
187 
189 
190  // How to update LPE AOVs with the overwrite flag set.
192  {
196  };
197 
199  : RixInterface(1),
200  m_anyLPEs(false),
201  m_anyCustomLPEs(false),
202  m_beautyChanId(k_InvalidChannelId)
203  {
204  }
205 
206  // Allocate and initialize an array of size 'count' of RixLPEState
207  // instances.
208  virtual RixLPEState* AllocateStates(int count) = 0;
209 
210  // Free an array of RixLPEState instances.
211  virtual void FreeStates(int count, RixLPEState* states) = 0;
212 
213  // Convert an integer RixLPEToken identifier to a string.
214  virtual RtUString TokenToString(RixLPEToken token) const = 0;
215 
216  // Convert a string to an integer RixLPEToken identifier.
217  virtual RixLPEToken StringToToken(RtUString str) const = 0;
218 
219  // Convert an LPE group / object name to an integer RixLPEToken identifier.
220  virtual RixLPEToken GroupAndObjectToToken(RtUString lpeGroup,
221  RtUString objName) const = 0;
222 
223  // Increment reference count on this object.
224  virtual void IncRef() = 0;
225 
226  // Decrement reference count on this object, deleting it when zero.
227  virtual void DecRef() = 0;
228 
229  // Return the current reference count on this object.
230  virtual int GetRefCnt() const = 0;
231 
233  PRMAN_INLINE static RixLPEToken LgtGrpIdToToken(int lightGroupId);
234 
235  // Return true if there are any light path expression AOVs.
236  PRMAN_INLINE bool AnyLPEs() const;
237 
238  // Return true if there are any custom light path expressions.
239  PRMAN_INLINE bool AnyCustomLPEs() const;
240 
241  virtual void Splat(const RixLPEState& accum, RixDisplayServices *dspy,
242  const RtColorRGB& val,
243  const int integratorCtxIdx, const RtColorRGB* lgtTrans,
244  const float clamp, const bool isFinite,
245  const OverwritePolicy overwritePolicy,
246  const bool isHoldout) const = 0;
247 
248 protected:
249  // The destructor is protected: no need to delete RixLPE instances.
250  virtual ~RixLPE() {}
251 
252  // True if there are any light path expression AOVs.
253  bool m_anyLPEs;
254 
255  // True if there are any custom light path expressions.
257 
258  // The channel id of the beauty pass.
260 
261 public:
262  // Represents the necessary information that we'll need to write out the
263  // standard AOV channels.
265  {
266  public:
267  // Constructor overload that sets all fields. Pass in the current
268  // RixLPEState instance up to this point along the light path
269  // (the 'state' parameter), along with the light LPE token of the
270  // current sample ('lightLpeToken'), the camera to primary hit transmission
271  // ('eyeTrans'), and the shadowing term ('lightTrans').
273  SplatHelper(
274  RixDisplayServices* displaySvc,
275  int integratorCtxIndex,
276  RixLPE& rixLpe,
277  RixLPEState& state,
278  int depth,
279  RixLPEToken lightLpeToken,
280  RixLPEToken lpeGroupId,
281  bool isReflect,
282  RtColorRGB const& eyeTrans,
283  RtColorRGB const& lightTrans,
284  RixShadingContext const* shadingCtx,
285  int shadingCtxIndex,
286  bool writeOpacityAllowed = true);
287 
289 
290  // Call this routine to splat per-lobe illumination to the beauty and
291  // LPE AOVs when performing the direct lighting optimization. We want
292  // to perform the splat for some AOVs only if each component of the
293  // beauty RGB value is finite. Also, in the case of clamping, we want
294  // to use a consistent clamp factor across all illumination AOVs, so
295  // pass in the clamping scalar factor as an argument to this method
296  // (default is 1.0, or no clamping).
298  RixBXActiveLobeWeights& activeLobes,
299  int weightIndex,
300  RtColorRGB const& thruput,
301  bool isFinite,
302  float clamp = 1.0f,
303  bool isHoldout = false);
304 
305  // Call this routine to splat emissive objects to the beauty and
306  // LPE AOVs when performing the direct lighting optimization. We want
307  // to perform the splat for some AOVs only if each component of the
308  // beauty RGB value is finite. Also, in the case of clamping, we want
309  // to use a consistent clamp factor across all illumination AOVs, so
310  // pass in the clamping scalar factor as an argument to this method
311  // (default is 1.0, or no clamping).
313  RtColorRGB const& emission,
314  RtColorRGB const& thruput,
315  bool isFinite,
316  float clamp = 1.0f,
317  bool isHoldout = false);
318 
319  // Call this routine to splat a single illumination contribution to the
320  // beauty and LPE AOVs. The RixLPEState instance passed by reference
321  // into the SplatHelper class constructor should have already performed
322  // the final state transition that corresponds to hitting a geolight or
323  // emissive object just prior to calling this routine, and then this
324  // method will accumulate the illumination contribution for the
325  // appropriate set of LPE AOVs (along with the beauty display channel).
327  RtColorRGB const& color,
328  bool isFinite,
329  float clamp = 1.0f);
330 
331  // Helper routine to splat a color/alpha to the beauty channel id.
333  RtColorRGB const& val,
334  RtColorRGB& trans) const;
335 
336  // Helper routine to splat a color/alpha to the array of channel ids
337  // associated with the current light path expression automata state.
338  PRMAN_INLINE void SplatLPE(
339  RtColorRGB const& val,
340  RtColorRGB const* lightTrans,
341  bool isFinite,
342  float clamp,
343  int lpeId = -1,
344  OverwritePolicy overwritePolicy = k_Overwrite,
345  bool isHoldout = false);
346 
347  // The following fields represent the information that we'll
348  // need to write out the standard set of AOVs.
349  int m_depth;
355 
356  // Cached references to the display services, context index, rixLpe,
357  // and the state of the LPE automata.
365  };
366 };
367 
368 // Represents a scatter event in the LPE system. One of these should be
369 // constructed for each call to the MoveVertex overloads when state should
370 // be transitioned at a light path vertex.
371 // There are three constructors for three use-cases:
372 // One to construct a scatter event from a vertex that has generated a sample
373 // This is predominantly used by a forward path tracer
374 //
375 // One to construct a scatter event from a vertex that has evaluated a sample
376 // This is predominantly used when trying to connect paths or merge paths in
377 // a bidirectional path tracer or VCM
378 //
379 // One to allow the LPE system to transition state for multiple lobes generated
380 // by next-event-estimation independently.
381 //
382 // The constructors perform error checking to ensure that there is only one
383 // scatter event defined by the passed in lobe traits and to ensure that the
384 // sampled lobe is valid. If neither of these are true an invalid scatter
385 // event is returned. Invalid scatter events have no effect on the LPE automatas
386 // when transitioning state.
388 {
389 public:
390  // Configures the event from a lobe sampled. The user lobe is ignored in the
391  // lobe sampled so this is mostly useful to transition state for indirect.
393 
394  // Configures the event as a scatter event determined from traits. The
395  // traits must represent a single lobe, otherwise the scatter event is
396  // invalid.
398 
399  // Configures the event arbitrarily.
400  PRMAN_INLINE RixLPEScatterEvent(bool isReflect, bool isUser,
401  bool isSpecular, unsigned char lpeId);
402 
403  // Is the scatter event valid
404  PRMAN_INLINE bool GetValid() const;
405 
406  // Get the token corresponding to the event type from this scatter event.
407  // Should be one of k_REFLECT or k_TRANSMIT
409 
410  // Get the token corresponding to the scatter type. This will be one of
411  // the DIFFUSE, SPECULAR or USER types.
413 
414  // Get the lpe id of the lobe that this scatter event represents
415  PRMAN_INLINE unsigned char GetLpeId() const;
416 
417  // Get the lpe index of the lobe that this scatter event represents. This
418  // is different from the lpe id since this is an absolute index starting
419  // at 0. E.g. the 0'th specular index is k_numDiffuse since the specular
420  // indices follow the diffuse indices, although the specular lpe id will
421  // be 0 in this case.
422  PRMAN_INLINE unsigned char GetLpeIndex() const;
423 
424 private:
425  bool m_isReflect;
426  unsigned char m_lpeId;
427  unsigned char m_lpeIndex;
428  RixLPEToken m_scatter;
429 };
430 
440 {
441 public:
442  RixLPEState( RixLPEAutomata const* automata, const int nautomata );
443 
444  ~RixLPEState();
445 
446  void Reset();
447 
448  std::vector<short>& GetState();
449  const std::vector<short>& GetState() const;
450  void SetState(const std::vector<short>& state);
451  bool Broken() const;
452  bool Test(const RixLPEToken dir, const RixLPEToken sca,
453  const RixLPEToken custom);
454 
455  const RtColorRGB& GetThruput() const;
456  const RixLPEAutomata* GetAutomata(int &nautomata) const;
457 
468  void MoveCamera(RixShadingContext const* sCtx, int sCtxIndex);
469 
481  void MoveCamera(RixShadingContext const* sCtx, int sCtxIndex,
482  const RtColorRGB& thruput);
483 
497  void MoveEmissiveObject(
498  RixShadingContext const* sCtx,
499  int sCtxIndex,
500  RtColorRGB const& thruput,
501  RixLPEToken lpeGroupId = RixLPE::k_BLANK);
502 
518  void MoveLight(
519  RixShadingContext const* sCtx,
520  int sCtxIndex,
521  RtColorRGB const& thruput,
522  RtColorRGB const* lightTrans,
523  bool firstContribution,
524  RixLPEToken lgtLpeToken);
525 
542  void MoveVertex(
543  RixShadingContext const* sCtx,
544  int sCtxIndex,
545  RixLPEScatterEvent const scatterEvent,
546  RixLPEToken lpeGroupId = RixLPE::k_BLANK);
547 
564  void MoveVertex(
565  RixShadingContext const* sCtx,
566  int sCtxIndex,
567  RixLPEScatterEvent const scatterEvent,
568  const RtColorRGB& thruput,
569  RixLPEToken lpeGroupId = RixLPE::k_BLANK,
570  bool doStateTransition = true);
571 
572 private:
573 
574  void move( const RixLPEToken event, const RixLPEToken scatt,
575  const RixLPEToken custom = RixLPE::k_BLANK );
576 
577  // Constant, read-only, data shared amongst all state mutable accumulator
578  // instances
579  const RixLPEAutomata *m_automata;
580  int m_nautomata;
581 
582  // Mutable data specific per-path
583  std::vector<short> m_state;
584 
585  // This LPE's current path thruput
586  RtColorRGB m_thruput;
587 };
588 
589 //
590 // class RixLPE inline method implementation
591 //
592 
593 #include "RixLPEInline.h" // IWYU pragma: export
594 
595 #endif
void MoveLight(RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RtColorRGB const *lightTrans, bool firstContribution, RixLPEToken lgtLpeToken)
Call this method at a light event along a light transport path.
Definition: RixLPEInline.h:253
Definition: RixLPE.h:143
PRMAN_INLINE RixLPEToken GetEvent() const
Definition: RixLPEInline.h:430
RixShadingContext is analogous to a RenderMan grid - it is a group of 1 or more points that may be sh...
Definition: RixShading.h:663
Definition: RixLPE.h:148
Definition: RixBxdfLobe.h:332
PRMAN_INLINE RixLPEToken GetScatt() const
Definition: RixLPEInline.h:437
virtual RtUString TokenToString(RixLPEToken token) const =0
Definition: RixLPE.h:195
void SetState(const std::vector< short > &state)
Definition: RixLPEInline.h:184
Definition: RixLPE.h:152
virtual void Splat(const RixLPEState &accum, RixDisplayServices *dspy, const RtColorRGB &val, const int integratorCtxIdx, const RtColorRGB *lgtTrans, const float clamp, const bool isFinite, const OverwritePolicy overwritePolicy, const bool isHoldout) const =0
Definition: RixLPE.h:166
~RixLPEState()
Definition: RixLPEInline.h:159
Definition: RixLPE.h:145
RixLPEState & m_state
Definition: RixLPE.h:361
Definition: RixLPE.h:149
PRMAN_INLINE unsigned char GetLpeIndex() const
Definition: RixLPEInline.h:449
virtual RixLPEState * AllocateStates(int count)=0
Definition: RixLPE.h:194
virtual RixLPEToken StringToToken(RtUString str) const =0
void MoveCamera(RixShadingContext const *sCtx, int sCtxIndex)
Call this method at a camera event along a light transport path.
Definition: RixLPEInline.h:222
Definition: RixLPE.h:153
static PRMAN_INLINE RixLPEToken LgtGrpIdToToken(int lightGroupId)
Convert an integer light group id to an LPE token.
Definition: RixLPEInline.h:125
pxrcore::ColorRGB RtColorRGB
Definition: RiTypesHelper.h:520
Definition: RixLPE.h:182
RixShadingContext const * m_sCtx
Definition: RixLPE.h:362
RtColorRGB m_lgtTrans
Definition: RixLPE.h:354
Definition: RixLPE.h:161
Definition: RixLPE.h:137
bool m_anyCustomLPEs
Definition: RixLPE.h:256
Base class for all Rix interfaces.
Definition: RixInterfaces.h:133
int m_depth
Definition: RixLPE.h:349
PRMAN_INLINE void SplatPerLobe(RixBXActiveLobeWeights &activeLobes, int weightIndex, RtColorRGB const &thruput, bool isFinite, float clamp=1.0f, bool isHoldout=false)
Definition: RixLPEInline.h:500
Definition: RixLPE.h:170
Definition: RixLPE.h:172
static const int k_baseLgtGrpTokenOffset
Definition: RixLPE.h:188
int RixLPEToken
Definition: RixInterfaces.h:977
OverwritePolicy
Definition: RixLPE.h:191
Definition: RixLPE.h:140
PRMAN_INLINE SplatHelper(RixDisplayServices *displaySvc, int integratorCtxIndex, RixLPE &rixLpe, RixLPEState &state, int depth, RixLPEToken lightLpeToken, RixLPEToken lpeGroupId, bool isReflect, RtColorRGB const &eyeTrans, RtColorRGB const &lightTrans, RixShadingContext const *shadingCtx, int shadingCtxIndex, bool writeOpacityAllowed=true)
Definition: RixLPEInline.h:465
bool m_anyLPEs
Definition: RixLPE.h:253
virtual void FreeStates(int count, RixLPEState *states)=0
Definition: RixLPE.h:151
This struct represents the characteristics of just one lobe of a bxdf.
Definition: RixBxdfLobe.h:63
Definition: RixLPE.h:135
Definition: RixLPE.h:158
Definition: RixLPE.h:169
RixLPEToken m_lgtLpeToken
Definition: RixLPE.h:350
Definition: RixLPE.h:144
Definition: RixLPE.h:138
Definition: RixLPE.h:162
Definition: RixLPE.h:168
Definition: RixLPE.h:133
void MoveVertex(RixShadingContext const *sCtx, int sCtxIndex, RixLPEScatterEvent const scatterEvent, RixLPEToken lpeGroupId=RixLPE::k_BLANK)
Invoke this method at an intermediate (non-camera/non-light) scattering event along a light transport...
Definition: RixLPEInline.h:270
PRMAN_INLINE unsigned char GetLpeId() const
Definition: RixLPEInline.h:443
Definition: RixLPE.h:139
Definition: RixLPE.h:150
RixLPEToken m_lpeGrpId
Definition: RixLPE.h:351
virtual RixLPEToken GroupAndObjectToToken(RtUString lpeGroup, RtUString objName) const =0
Definition: RixLPE.h:147
Definition: RixLPE.h:180
bool m_writeOpacityAllowed
Definition: RixLPE.h:364
Definition: RixLPE.h:146
Definition: RixLPE.h:183
bool Broken() const
Definition: RixLPEInline.h:190
Definition: RixLPE.h:157
const RixLPEAutomata * GetAutomata(int &nautomata) const
Definition: RixLPEInline.h:215
Definition: RixLPE.h:163
void Reset()
Definition: RixLPEInline.h:164
Definition: RixLPE.h:159
A compact deterministic finite automata class.
Definition: RixLPEInline.h:69
Definition: RixLPE.h:179
const RtColorRGB & GetThruput() const
Definition: RixLPEInline.h:209
PRMAN_INLINE bool AnyCustomLPEs() const
Definition: RixLPEInline.h:143
#define PRMAN_INLINE
Definition: prmanapi.h:99
Definition: RixLPE.h:184
Definition: RixLPE.h:171
Definition: RixLPE.h:164
Multiple methods of RixDisplayServices require similar parameters:
Definition: RixIntegrator.h:97
Definition: RixLPE.h:165
Definition: RixLPE.h:387
RtColorRGB m_eyeTrans
Definition: RixLPE.h:353
Definition: RixLPE.h:160
void MoveEmissiveObject(RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RixLPEToken lpeGroupId=RixLPE::k_BLANK)
Call this method at an emissive object event along a light transport path.
Definition: RixLPEInline.h:240
RixLPE()
Definition: RixLPE.h:198
Definition: RixLPE.h:185
Definition: RixLPE.h:155
RixLPEState(RixLPEAutomata const *automata, const int nautomata)
Definition: RixLPEInline.h:151
Definition: RixLPE.h:264
PRMAN_INLINE void SplatBeauty(RtColorRGB const &val, RtColorRGB &trans) const
Definition: RixLPEInline.h:716
PRMAN_INLINE RixLPEScatterEvent(RixBXLobeSampled lobeSampled)
Definition: RixLPEInline.h:361
int m_integratorCtxIdx
Definition: RixLPE.h:359
Definition: RixLPE.h:136
Definition: RixLPE.h:167
Definition: RixLPE.h:127
Definition: RixLPE.h:181
PRMAN_INLINE bool GetValid() const
Definition: RixLPEInline.h:455
std::vector< short > & GetState()
Definition: RixLPEInline.h:172
Definition: RixLPE.h:156
PRMAN_INLINE ~SplatHelper()
Definition: RixLPEInline.h:495
RixChannelId m_beautyChanId
Definition: RixLPE.h:259
bool m_isReflect
Definition: RixLPE.h:352
Represents the LPE system state of a light transport path.
Definition: RixLPE.h:439
Definition: RixLPE.h:142
std::vector< RixChannelId > ChanIdVec
Definition: RixLPE.h:51
PRMAN_INLINE void SplatValue(RtColorRGB const &color, bool isFinite, float clamp=1.0f)
Definition: RixLPEInline.h:695
unsigned int RixChannelId
Definition: RixIntegrator.h:55
Definition: RixLPE.h:193
int m_shadingCtxIdx
Definition: RixLPE.h:363
This struct represents the characteristics of potentially several lobes of a bxdf in aggregate...
Definition: RixBxdfLobe.h:178
RixLPEFlags
Definition: RixLPE.h:177
RixLPE & m_rixLpe
Definition: RixLPE.h:360
virtual void DecRef()=0
pxrcore::UString RtUString
Definition: RiTypesHelper.h:682
virtual int GetRefCnt() const =0
PRMAN_INLINE void SplatEmission(RtColorRGB const &emission, RtColorRGB const &thruput, bool isFinite, float clamp=1.0f, bool isHoldout=false)
Definition: RixLPEInline.h:633
Definition: RixLPE.h:154
virtual void IncRef()=0
bool Test(const RixLPEToken dir, const RixLPEToken sca, const RixLPEToken custom)
Definition: RixLPEInline.h:198
PRMAN_INLINE bool AnyLPEs() const
Definition: RixLPEInline.h:136
RixDisplayServices * m_displaySvc
Definition: RixLPE.h:358
PRMAN_INLINE void SplatLPE(RtColorRGB const &val, RtColorRGB const *lightTrans, bool isFinite, float clamp, int lpeId=-1, OverwritePolicy overwritePolicy=k_Overwrite, bool isHoldout=false)
Definition: RixLPEInline.h:729
Definition: RixLPE.h:134
Definition: RixLPE.h:141
RixLPEBuiltInTokens
Definition: RixLPE.h:131
virtual ~RixLPE()
Definition: RixLPE.h:250